aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrc.d/init.d/network5
-rwxr-xr-xsysconfig/network-scripts/ifup-routes5
2 files changed, 8 insertions, 2 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 3d3669f7..d6987e4a 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -64,8 +64,9 @@ case "$1" in
# Add non interface-specific static-routes.
if [ -f /etc/sysconfig/static-routes ]; then
- grep "^any" /etc/sysconfig/static-routes | while read ignore args; do
- /sbin/route add -$args
+ grep "^any" /etc/sysconfig/static-routes | while read ignore type dest netmask mask gw gateway; do
+ [ "${gateway}" != "${gateway##[0-9}" ] && \
+ /sbin/route add -$type $dest $netmask $mask $gw $gateway
done
fi
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes
index bcd8ac3b..c96f947e 100755
--- a/sysconfig/network-scripts/ifup-routes
+++ b/sysconfig/network-scripts/ifup-routes
@@ -15,3 +15,8 @@ fi
grep "^$1 " /etc/sysconfig/static-routes | while read device args; do
/sbin/route add -$args $device
done
+grep "^any " /etc/sysconfig/static-routes | while read ignore type net netmask mask bogus dev ; do
+ if [ "$dev" = "$device" ]; then
+ /sbin/route add -$type $net $netmask $mask $dev
+ fi
+done