diff options
author | Bill Nottingham <notting@redhat.com> | 2005-06-09 18:46:29 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-06-09 18:46:29 +0000 |
commit | 4b212bbf473a5715b13248512d9dddc4f75826b6 (patch) | |
tree | 2f27ee881bc13e5854615751ead58e31d33c69a1 /sysconfig/network-scripts/ifdown | |
parent | e5cd2486eb8efe45a8d9e7792835edcfdc614d7a (diff) | |
download | initscripts-4b212bbf473a5715b13248512d9dddc4f75826b6.tar initscripts-4b212bbf473a5715b13248512d9dddc4f75826b6.tar.gz initscripts-4b212bbf473a5715b13248512d9dddc4f75826b6.tar.bz2 initscripts-4b212bbf473a5715b13248512d9dddc4f75826b6.tar.xz initscripts-4b212bbf473a5715b13248512d9dddc4f75826b6.zip |
fix grep to always match the full hwaddr, as opposed to matching '0'
against '00:AA:BB:CC:DD:EE'. Take into account lines that end with
spaces, or with "# this is a comment", too. Also, put the grep in only
one place instead of 3. Fixes #157252, #153669.
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index 445c87c8..d0fb95ae 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -61,7 +61,7 @@ check_device_down ${DEVICE} && [ "$BOOTPROTO" != "dhcp" -a "$BOOTPROTO" != "boot if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then FOUNDMACADDR=`get_hwaddr ${REALDEVICE}` if [ -n "${FOUNDMACADDR}" -a "${FOUNDMACADDR}" != "${HWADDR}" ]; then - NEWCONFIG=`LANG=C grep -il "^[[:space:]]*HWADDR=${HWADDR}" /etc/sysconfig/network-scripts/ifcfg-*` + NEWCONFIG=`get_config_by_hwaddr ${FOUNDMACADDR}` if [ -n "${NEWCONFIG}" -a "${NEWCONFIG##*/}" != "${CONFIG##*/}" ]; then exec /sbin/ifdown ${NEWCONFIG} else |