aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-09-04 04:02:07 +0000
committerBill Nottingham <notting@redhat.com>2001-09-04 04:02:07 +0000
commit712c6dc9f51161f12f5fc6469302a6bb9b371e65 (patch)
tree74f27d976140db945b9266361ef89a67118c2f80 /sysconfig/network-scripts/ifdown
parent6107f6863630a0e4f41e10fea015637a93a18b22 (diff)
downloadinitscripts-712c6dc9f51161f12f5fc6469302a6bb9b371e65.tar
initscripts-712c6dc9f51161f12f5fc6469302a6bb9b371e65.tar.gz
initscripts-712c6dc9f51161f12f5fc6469302a6bb9b371e65.tar.bz2
initscripts-712c6dc9f51161f12f5fc6469302a6bb9b371e65.tar.xz
initscripts-712c6dc9f51161f12f5fc6469302a6bb9b371e65.zip
fix severe alias handling breakage (#52882)
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-xsysconfig/network-scripts/ifdown7
1 files changed, 5 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index f93d7958..c807c711 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -37,6 +37,7 @@ if [ -x /sbin/ifdown-pre-local ]; then
fi
DEVICETYPE=`echo $DEVICE | sed "s/[0-9]*$//"`
+REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'`
OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-${DEVICETYPE}"
if [ -x $OTHERSCRIPT ]; then
@@ -82,10 +83,12 @@ if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
}
else
expand_config
- ip addr del ${IPADDR}/${PREFIX} brd ${BROADCAST:-+} dev ${DEVICE}
+ ip addr del ${IPADDR}/${PREFIX} brd ${BROADCAST:-+} dev ${REALDEVICE}
fi
-ip link set ${DEVICE} down
+if [ "${REALDEVICE}" = "${DEVICE}" ]; then
+ ip link set ${DEVICE} down
+fi
[ "$retcode" = "0" ] && retcode=$?
# wait up to 5 seconds for device to actually come down...