diff options
author | Bill Nottingham <notting@redhat.com> | 2007-11-26 18:22:13 +0000 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2011-04-19 16:12:18 +0200 |
commit | a6a62aba6ea8bdbeff7ec8fdfeb89c79cd18390f (patch) | |
tree | 9e3411ea872f2e010109145d4bca3352adc78179 | |
parent | ca41cf92981b079cbebffb59a508556f4d1f9c28 (diff) | |
download | initscripts-a6a62aba6ea8bdbeff7ec8fdfeb89c79cd18390f.tar initscripts-a6a62aba6ea8bdbeff7ec8fdfeb89c79cd18390f.tar.gz initscripts-a6a62aba6ea8bdbeff7ec8fdfeb89c79cd18390f.tar.bz2 initscripts-a6a62aba6ea8bdbeff7ec8fdfeb89c79cd18390f.tar.xz initscripts-a6a62aba6ea8bdbeff7ec8fdfeb89c79cd18390f.zip |
don't endlessly loop on ifdown if devices are inconsistent (#390271)
[Bill Nottingham <notting@redhat.com>: squashed typo]
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 2be3ef4d..1f60e592 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -30,7 +30,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." |