aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-06-09 18:46:57 +0000
committerBill Nottingham <notting@redhat.com>2005-06-09 18:46:57 +0000
commit60899ae51bf662d92c8effe66ebe263117fd977a (patch)
treee685fbce6c971c1682201359103ce306c2b20b60 /sysconfig/network-scripts/ifdown
parentce1e0ad5ced357d270b54cdbec133c516f302dfe (diff)
downloadinitscripts-60899ae51bf662d92c8effe66ebe263117fd977a.tar
initscripts-60899ae51bf662d92c8effe66ebe263117fd977a.tar.gz
initscripts-60899ae51bf662d92c8effe66ebe263117fd977a.tar.bz2
initscripts-60899ae51bf662d92c8effe66ebe263117fd977a.tar.xz
initscripts-60899ae51bf662d92c8effe66ebe263117fd977a.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-xsysconfig/network-scripts/ifdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 4242baab..b02fb5c6 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -52,7 +52,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