aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-02-07 22:25:21 +0000
committerBill Nottingham <notting@redhat.com>2005-02-07 22:25:21 +0000
commit35b0eeb4279c8f33a4beda2cbae45e4c127af7f1 (patch)
treed5c99581d8a9d29bb6697028e318ee0efc313489 /sysconfig/network-scripts
parent0f26d670e901069f57142fc31d5218cb54526058 (diff)
downloadinitscripts-35b0eeb4279c8f33a4beda2cbae45e4c127af7f1.tar
initscripts-35b0eeb4279c8f33a4beda2cbae45e4c127af7f1.tar.gz
initscripts-35b0eeb4279c8f33a4beda2cbae45e4c127af7f1.tar.bz2
initscripts-35b0eeb4279c8f33a4beda2cbae45e4c127af7f1.tar.xz
initscripts-35b0eeb4279c8f33a4beda2cbae45e4c127af7f1.zip
handle being called on down devices better
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 503bbe72..bc34f856 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -36,9 +36,9 @@ check_device_down ${DEVICE} && [ "$BOOTPROTO" != "dhcp" -a "$BOOTPROTO" != "boot
if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then
FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
- if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
+ if [ -n "${FOUNDMACADDR}" -a "${FOUNDMACADDR}" != "${HWADDR}" ]; then
NEWCONFIG=`LANG=C grep -il "^[[:space:]]*HWADDR=${HWADDR}" /etc/sysconfig/network-scripts/ifcfg-*`
- if [ -n "${NEWCONFIG}" -a "${NEWCONFIG}" != "${CONFIG}" ]; then
+ if [ -n "${NEWCONFIG}" -a "${NEWCONFIG##*/}" != "${CONFIG##*/}" ]; then
exec /sbin/ifdown ${NEWCONFIG}
else
echo $"Device ${DEVICE} has different MAC address than expected, ignoring."
@@ -79,7 +79,7 @@ else
fi
if [ "${REALDEVICE}" = "${DEVICE}" ]; then
- ip link set dev ${DEVICE} down
+ ip link set dev ${DEVICE} down 2>/dev/null
fi
[ "$retcode" = "0" ] && retcode=$?