From b7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58 Mon Sep 17 00:00:00 2001 From: "Michael K. Johnson" Date: Sat, 2 May 1998 21:37:53 +0000 Subject: linuxconf support --- sysconfig/network-scripts/ifup-routes | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'sysconfig/network-scripts/ifup-routes') 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 -- cgit v1.2.1