aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsysconfig/network-scripts/ifup-aliases2
-rwxr-xr-xsysconfig/network-scripts/ifup-post2
-rwxr-xr-xsysconfig/network-scripts/ifup-routes10
3 files changed, 11 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases
index a1fa2ac0..72d5579c 100755
--- a/sysconfig/network-scripts/ifup-aliases
+++ b/sysconfig/network-scripts/ifup-aliases
@@ -276,7 +276,7 @@ function new_interface ()
fi
fi
- /etc/sysconfig/network-scripts/ifup-routes ${DEVICE}
+ /etc/sysconfig/network-scripts/ifup-routes ${DEVICE} ${NAME}
do_netreport=yes
ifuplocal_queue="$ifuplocal_queue $DEVICE"
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index c9591631..2fbafbfb 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -21,7 +21,7 @@ if [ "$ISALIAS" = no ] ; then
/etc/sysconfig/network-scripts/ifup-aliases ${DEVICE} ${CONFIG}
fi
-/etc/sysconfig/network-scripts/ifup-routes ${DEVICE}
+/etc/sysconfig/network-scripts/ifup-routes ${DEVICE} ${NAME}
if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then
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)`