aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-eth
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-11-26 18:22:13 +0000
committerBill Nottingham <notting@redhat.com>2007-11-26 18:22:13 +0000
commit1b9d3b70ea03346b9ffd4f024239f420ff61aaf8 (patch)
tree72b26858c9bcebb2cf61c94d2f9ca67795abf8c8 /sysconfig/network-scripts/ifdown-eth
parent92b8f477e7f11f406891fca5d1910a476d7a794c (diff)
downloadinitscripts-1b9d3b70ea03346b9ffd4f024239f420ff61aaf8.tar
initscripts-1b9d3b70ea03346b9ffd4f024239f420ff61aaf8.tar.gz
initscripts-1b9d3b70ea03346b9ffd4f024239f420ff61aaf8.tar.bz2
initscripts-1b9d3b70ea03346b9ffd4f024239f420ff61aaf8.tar.xz
initscripts-1b9d3b70ea03346b9ffd4f024239f420ff61aaf8.zip
don't endlessly loop on ifdown if devices are inconsistent (#390271)
Diffstat (limited to 'sysconfig/network-scripts/ifdown-eth')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 09ea71c2..4b2a926b 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -48,7 +48,8 @@ if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then
FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
if [ -n "${FOUNDMACADDR}" -a "${FOUNDMACADDR}" != "${HWADDR}" ]; then
NEWCONFIG=`get_config_by_hwaddr ${FOUNDMACADDR}`
- if [ -n "${NEWCONFIG}" -a "${NEWCONFIG##*/}" != "${CONFIG##*/}" ]; then
+` eval $(LANG=C fgrep "DEVICE=" $NEWCONFIG)
+ if [ -n "${NEWCONFIG}" -a "${NEWCONFIG##*/}" != "${CONFIG##*/}" -a "${DEVICE}" = "${REALDEVICE}" ]; then
exec /sbin/ifdown ${NEWCONFIG}
else
echo $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring."