aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPreston Brown <pbrown@redhat.com>2002-06-27 17:30:09 +0000
committerPreston Brown <pbrown@redhat.com>2002-06-27 17:30:09 +0000
commite07b340f337d8c03410921166b182e854f684299 (patch)
treea4bdfeea6216060246c3d73e0c1df17392bf2006
parentf5c2f35a493a14169c170e11b93853e49dde227e (diff)
downloadinitscripts-e07b340f337d8c03410921166b182e854f684299.tar
initscripts-e07b340f337d8c03410921166b182e854f684299.tar.gz
initscripts-e07b340f337d8c03410921166b182e854f684299.tar.bz2
initscripts-e07b340f337d8c03410921166b182e854f684299.tar.xz
initscripts-e07b340f337d8c03410921166b182e854f684299.zip
move device down checking higher up, and clarify.
-rwxr-xr-xsysconfig/network-scripts/ifdown8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 9f07eb6f..7d0d09ec 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -31,6 +31,11 @@ fi
source_config
+# Check to make sure the device is actually up.
+# we still run the script if the device is down and it was configured
+# with DHCP or BOOTP, to insure dhcp/bootp dies.
+check_device_down ${DEVICE} && [ "$BOOTPROTO" != "dhcp" -a "$BOOTPROTO" != "bootp" ] && exit 0
+
if [ -x /sbin/ifdown-pre-local ]; then
/sbin/ifdown-pre-local ${DEVICE}
fi
@@ -45,9 +50,6 @@ fi
. /etc/sysconfig/network
-# Check to make sure the device is actually up
-check_device_down ${DEVICE} && [ "$BOOTPROTO" != "dhcp" -a "$BOOTPROTO" != "bootp" ] && exit 0
-
if [ -n "${HWADDR}" ]; then
FOUNDMACADDR=`LC_ALL= LANG= ip -o link show ${REALDEVICE} | \
sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'`