]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
fixed parsing static-routes file for proper device
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 27 Oct 2000 10:34:24 +0000 (10:34 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 27 Oct 2000 10:34:24 +0000 (10:34 +0000)
svn-id: @817

sysconfig/network-scripts/ifup-routes

index 6f814f871665e0622722eccea1d66cb5d8cb99d5..819cd2c85efebfef23004cd263180e4868389d76 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifup-routes,v 1.8.2.1 2000/10/18 20:10:55 misiek Exp $
+#      $Id: ifup-routes,v 1.8.2.2 2000/10/27 10:34:24 misiek Exp $
 #
 # adds static routes which go through device $DEVICE
 
@@ -8,7 +8,9 @@
 . /etc/rc.d/init.d/functions
 . /etc/sysconfig/network-scripts/.functions
 
-if [ "$1" = "" ]; then
+DEV=$1
+
+if [ -z "$DEV" ]; then
        nls "usage: %s <device name>" "ifup-routes" >&2
        exit 1
 fi
@@ -17,9 +19,12 @@ if [ ! -f /etc/sysconfig/static-routes ]; then
        exit 0
 fi
 
-cd /etc/sysconfig/network-scripts
-
-CONFIG=$1
+if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
+        CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
+else
+        CONFIG="$DEV"
+fi
+               
 source_config
 
 # set all major variables
This page took 0.033738 seconds and 4 git commands to generate.