Hi
In the /etc/init.d/network file, there are few lines to add static routes from a file:
--------- if [ -f /etc/sysconfig/static-routes ]; then grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do /sbin/route add -$args done ---------
Initially, I add routes like: /sbin/route add 10.x.x.x eth0; before noticing the above lines. But, I found that these routes where not added. So, I modified the script above to something like:
---------
if [ -f /etc/sysconfig/static-routes ]; then
grep "^.*" /etc/sysconfig/static-routes | while read args ; do
$args
done
fi ---------
and thereafter, whenever I restart the network all the routes are added, which did happen before.
Out of curiousity, I would like to know why is the /etc/init.d/network file having such lines that do not match. Or is it that linux expects it users to make changes to the file, or enter routes in /etc/sysconfig/static-routes following that specific syntax ??
Cheers, Dinil
- : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html