aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-08-08 19:20:58 +0000
committerBill Nottingham <notting@redhat.com>2003-08-08 19:20:58 +0000
commit845a2e77f9588594b898a2eaebc096482ff8406f (patch)
tree00bd39f5f61ca3c6c78194d56a1168e2d7db36f2
parentcc78f2f6159711900e1d42133b29f63c4c342411 (diff)
downloadinitscripts-845a2e77f9588594b898a2eaebc096482ff8406f.tar
initscripts-845a2e77f9588594b898a2eaebc096482ff8406f.tar.gz
initscripts-845a2e77f9588594b898a2eaebc096482ff8406f.tar.bz2
initscripts-845a2e77f9588594b898a2eaebc096482ff8406f.tar.xz
initscripts-845a2e77f9588594b898a2eaebc096482ff8406f.zip
- ifup-routes: pass the interface name to handle_file() so that we don't try
to use the routes file's name as an interface name
-rwxr-xr-xsysconfig/network-scripts/ifup-routes6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes
index 37bd2287..ee352193 100755
--- a/sysconfig/network-scripts/ifup-routes
+++ b/sysconfig/network-scripts/ifup-routes
@@ -15,7 +15,7 @@ handle_file () {
if [ "x$(eval echo '$'GATEWAY$routenum)x" != "xx" ]; then
line="$line via $(eval echo '$'GATEWAY$routenum)"
fi
- line="$line dev $1"
+ line="$line dev $2"
/sbin/ip route add $line
routenum=$(($routenum+1))
done
@@ -30,7 +30,7 @@ for file in $FILES; do
if [ -f "$file" ]; then
if egrep -q 'ADDRESS[0-9]+=' $file ; then
# new format
- handle_file $file
+ handle_file $file $1
else
# older format
while read line; do
@@ -44,4 +44,4 @@ done
# Red Hat network configuration format
NICK=${2:-$1}
CONFIG="/etc/sysconfig/network-scripts/$NICK.route"
-[ -f $CONFIG ] && handle_file $CONFIG
+[ -f $CONFIG ] && handle_file $CONFIG $1