aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-xsysconfig/network-scripts/ifdown14
1 files changed, 12 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 3130429f..fe1b3aba 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -39,12 +39,22 @@ fi
# Check to make sure the device is actually up
check_device_down && exit 0
+retcode=0
if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
- [ -n "`pidof -x pump`" ] && pump -r -i ${DEVICE}
- [ -n "`pidof -x dhcpcd`" ] && dhcpcd -k ${DEVICE}
+ [ -n "`pidof -x pump`" ] && {
+ pump -r -i ${DEVICE}
+ retcode=$?
+ }
+ [ -n "`pidof -x dhcpcd`" ] && {
+ dhcpcd -k ${DEVICE}
+ retcode=$?
+ }
fi
+
ifconfig ${DEVICE} down
+[ "$retcode" = "0" ] && retcode=$?
+
# wait up to 5 seconds for device to actually come down...
waited=0
while ! check_device_down && [ "$waited" -lt 50 ] ; do