aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-06-07 19:40:40 +0000
committerBill Nottingham <notting@redhat.com>2004-06-07 19:40:40 +0000
commitf68092f16f891b6590bea27cac9313387cd8f1a2 (patch)
tree36c420647955fc84a4c64e9eb30d07e38e088801
parent31bef2825b1455a6d5acdf14caa418769a61d8f5 (diff)
downloadinitscripts-f68092f16f891b6590bea27cac9313387cd8f1a2.tar
initscripts-f68092f16f891b6590bea27cac9313387cd8f1a2.tar.gz
initscripts-f68092f16f891b6590bea27cac9313387cd8f1a2.tar.bz2
initscripts-f68092f16f891b6590bea27cac9313387cd8f1a2.tar.xz
initscripts-f68092f16f891b6590bea27cac9313387cd8f1a2.zip
remove bogus route setting (#120908)
-rwxr-xr-xsysconfig/network-scripts/ifup-aliases36
1 files changed, 30 insertions, 6 deletions
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases
index 40d27f7d..277fd6f0 100755
--- a/sysconfig/network-scripts/ifup-aliases
+++ b/sysconfig/network-scripts/ifup-aliases
@@ -255,11 +255,6 @@ function new_interface ()
if [ "$NO_ALIASROUTING" != yes ]; then
- # this is broken! it's only here for compatibility with old RH systems
- if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" ]; then
- route add default gw ${GATEWAY} metric 1 ${DEVICE}
- fi
-
GATEWAY=$network_GATEWAY;
GATEWAYDEV=$network_GATEWAYDEV;
@@ -291,11 +286,38 @@ function new_interface ()
if [ "$BASH_VERSINFO" ]; then shopt -s nullglob; else allow_null_glob_expansion=foo; fi
+# Is there any linuxconf-style alias files.
+linuxconfstyle=0
for FILE in ifcfg-${parent_device}:* ; do
+
ini_env;
. $FILE;
- new_interface;
+ if [ -z "$DEVICE" ]; then
+ # it's a linuxconf file.
+ # I don't think this script will handle both style correctly
+ # though. Well, those who knows about the other style don't know
+ # the other style and vice versa
+ linuxconfstyle=1
+ else
+ new_interface;
+ fi
done
+if [ "$linuxconfstyle" = "1" ] ; then
+ linuxconf --hint ipalias $device \
+ | while read command ali ip mask bcast
+ do
+ if [ "$command" = "del" ] ; then
+ /sbin/ifconfig $ali down
+ do_netreport=yes
+ elif [ "$command" = "add" ] ; then
+ /sbin/ifconfig $ali $ip netmask $mask broadcast $bcast
+ do_netreport=yes
+ else
+ echo Incomatible hinting: $command $rest >&2
+ fi
+ done
+fi
+
for FILE in ifcfg-${parent_device}-range* ; do
@@ -330,6 +352,7 @@ done
#
# Remove any devices that should not be around
#
+if [ "$linuxconfstyle" = "0" ] ; then
for DEVNUM in $rdev_LIST ; do
eval " rdev_mark=\$rdev_${DEVNUM}_mark ";
if [ -z "$rdev_mark" ]; then
@@ -338,6 +361,7 @@ done
do_netreport=yes
fi
done
+fi
#
# Notify of new device creation
#