aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-12-26 05:48:58 +0000
committerBill Nottingham <notting@redhat.com>2000-12-26 05:48:58 +0000
commita49b27d46947b926f6d48a1329689db72904d519 (patch)
tree4af18ff5ac15daa3f786caf48306ea9fd4c29b92
parentbf8548076b36a2c22eb5d73ec3beb850a927e6aa (diff)
downloadinitscripts-a49b27d46947b926f6d48a1329689db72904d519.tar
initscripts-a49b27d46947b926f6d48a1329689db72904d519.tar.gz
initscripts-a49b27d46947b926f6d48a1329689db72904d519.tar.bz2
initscripts-a49b27d46947b926f6d48a1329689db72904d519.tar.xz
initscripts-a49b27d46947b926f6d48a1329689db72904d519.zip
retcode wasn't used. initialize it.
-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