diff options
author | Bill Nottingham <notting@redhat.com> | 2003-02-20 17:14:53 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2003-02-20 17:14:53 +0000 |
commit | 293008d164b39d61090b3a370d6be15a0a7f91dc (patch) | |
tree | 12ede51ecaa781319c523dee4ad59f54f5a74b3f /sysconfig/network-scripts/ifup-routes | |
parent | f25b42a4885c34447c4dc8350ec5f9637e217372 (diff) | |
download | initscripts-293008d164b39d61090b3a370d6be15a0a7f91dc.tar initscripts-293008d164b39d61090b3a370d6be15a0a7f91dc.tar.gz initscripts-293008d164b39d61090b3a370d6be15a0a7f91dc.tar.bz2 initscripts-293008d164b39d61090b3a370d6be15a0a7f91dc.tar.xz initscripts-293008d164b39d61090b3a370d6be15a0a7f91dc.zip |
redhat-config-network writes $NAME.route, not $DEVICE.route. Handle
that. (#84193)
Diffstat (limited to 'sysconfig/network-scripts/ifup-routes')
-rwxr-xr-x | sysconfig/network-scripts/ifup-routes | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes index 912c9bba..a1d1ae3b 100755 --- a/sysconfig/network-scripts/ifup-routes +++ b/sysconfig/network-scripts/ifup-routes @@ -13,14 +13,22 @@ if [ -f "/etc/sysconfig/network-scripts/route-$1" ]; then done < "/etc/sysconfig/network-scripts/route-$1" fi +if [ -n "$2" -a "$2" != "$1" ]; then + if [ -f "/etc/sysconfig/network-scripts/route-$2" ]; then + while read line; do + /sbin/ip route add $line + done < "/etc/sysconfig/network-scripts/route-$2" + fi +fi + # Red Hat network configuration format CONFIG="/etc/sysconfig/networking/devices/$1.route" +[ -f $CONFIG ] || CONFIG="/etc/sysconfig/networking/devices/$2.route" [ -f $CONFIG ] || exit 0 . $CONFIG - routenum=0 while [ "x$(eval echo '$'ADDRESS$routenum)x" != "xx" ]; do eval `ipcalc -p $(eval echo '$'ADDRESS$routenum) $(eval echo '$'NETMASK$routenum)` |