diff options
author | Michael K. Johnson <johnsonm@redhat.com> | 1998-05-02 21:37:53 +0000 |
---|---|---|
committer | Michael K. Johnson <johnsonm@redhat.com> | 1998-05-02 21:37:53 +0000 |
commit | b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58 (patch) | |
tree | 2d1fdbf73df6a9e44d3510e3aef77c7421a50d8f /sysconfig/network-scripts/ifup-routes | |
parent | 7da45feaa8f70f28fc1278f22bcd07956517964d (diff) | |
download | initscripts-b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58.tar initscripts-b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58.tar.gz initscripts-b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58.tar.bz2 initscripts-b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58.tar.xz initscripts-b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58.zip |
linuxconf supportr3-56
Diffstat (limited to 'sysconfig/network-scripts/ifup-routes')
-rwxr-xr-x | sysconfig/network-scripts/ifup-routes | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes index f8006b8b..6cae8d4c 100755 --- a/sysconfig/network-scripts/ifup-routes +++ b/sysconfig/network-scripts/ifup-routes @@ -7,11 +7,19 @@ if [ "$1" = "" ]; then exit 1 fi -if [ ! -f /etc/sysconfig/static-routes ]; then - exit 0 -fi +if [ -x /bin/linuxconf ] ; then + rm -f /var/run/routes.current + linuxconf --hint routing "$1" | while read args; do + /sbin/route $args + echo $args >> /var/run/routes.current + done +else + if [ ! -f /etc/sysconfig/static-routes ]; then + exit 0 + fi -#note the trailing space in the grep gets rid of aliases -grep "^$1 " /etc/sysconfig/static-routes | while read device args; do - /sbin/route add -$args $device -done + #note the trailing space in the grep gets rid of aliases + grep "^$1 " /etc/sysconfig/static-routes | while read device args; do + /sbin/route add -$args $device + done +fi |