diff options
author | Bill Nottingham <notting@redhat.com> | 2002-11-12 06:42:07 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2002-11-12 06:42:07 +0000 |
commit | 8db687d270a970287933e4abcfbb85b80ad37c8f (patch) | |
tree | 1bdc4561c4c09f91b365703ddfb61f473835cc97 /sysconfig/network-scripts | |
parent | ac078c4974e30a741ae26bf451c7b2c025eb4494 (diff) | |
download | initscripts-8db687d270a970287933e4abcfbb85b80ad37c8f.tar initscripts-8db687d270a970287933e4abcfbb85b80ad37c8f.tar.gz initscripts-8db687d270a970287933e4abcfbb85b80ad37c8f.tar.bz2 initscripts-8db687d270a970287933e4abcfbb85b80ad37c8f.tar.xz initscripts-8db687d270a970287933e4abcfbb85b80ad37c8f.zip |
fix static route brokenness (#74317, #74320, #76619, #75604)
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifup-routes | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes index f6734375..912c9bba 100755 --- a/sysconfig/network-scripts/ifup-routes +++ b/sysconfig/network-scripts/ifup-routes @@ -6,12 +6,20 @@ if [ -z "$1" ]; then exit 1 fi +# Older format +if [ -f "/etc/sysconfig/network-scripts/route-$1" ]; then + while read line; do + /sbin/ip route add $line + done < "/etc/sysconfig/network-scripts/route-$1" +fi + +# Red Hat network configuration format + CONFIG="/etc/sysconfig/networking/devices/$1.route" [ -f $CONFIG ] || exit 0 . $CONFIG -# Red Hat network configuration format routenum=0 while [ "x$(eval echo '$'ADDRESS$routenum)x" != "xx" ]; do @@ -25,7 +33,3 @@ while [ "x$(eval echo '$'ADDRESS$routenum)x" != "xx" ]; do routenum=$(($routenum+1)) done -# Older format -while read line; do - /sbin/ip route add $line -done < "/etc/sysconfig/network-scripts/route-$1" |