aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-xsysconfig/network-scripts/ifdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 5a440044..a22e7302 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -105,7 +105,7 @@ retcode=0
pump -r -i ${DEVICE}
retcode=$?
}
-if ! [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
+if [ -d "/sys/class/net/${REALDEVICE}" ]; then
# we can't just delete the configured address because that address
# may have been changed in the config file since the device was
# brought up. Flush all addresses associated with this
@@ -119,10 +119,10 @@ if ! [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
if [ "${SLAVE}" = "yes" -a -n "${MASTER}" ]; then
/sbin/ifenslave -d ${MASTER} ${DEVICE} 2>/dev/null
fi
-fi
-if [ "${REALDEVICE}" = "${DEVICE}" ]; then
- ip link set dev ${DEVICE} down 2>/dev/null
+ if [ "${REALDEVICE}" = "${DEVICE}" ]; then
+ ip link set dev ${DEVICE} down 2>/dev/null
+ fi
fi
[ "$retcode" = "0" ] && retcode=$?