diff options
author | Bill Nottingham <notting@redhat.com> | 2005-01-12 20:57:19 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-01-12 20:57:19 +0000 |
commit | 25f7d7fc6ae84bc15b47ae51d97aea5b99ad995f (patch) | |
tree | 0a9d65b7f931fd65f1b30e4532c18a8cefdd4465 /sysconfig/network-scripts/network-functions | |
parent | 2bdcdcd41e3c9145073a74b08aae898984018051 (diff) | |
download | initscripts-25f7d7fc6ae84bc15b47ae51d97aea5b99ad995f.tar initscripts-25f7d7fc6ae84bc15b47ae51d97aea5b99ad995f.tar.gz initscripts-25f7d7fc6ae84bc15b47ae51d97aea5b99ad995f.tar.bz2 initscripts-25f7d7fc6ae84bc15b47ae51d97aea5b99ad995f.tar.xz initscripts-25f7d7fc6ae84bc15b47ae51d97aea5b99ad995f.zip |
fix various fgreps to not catch commented lines (#136531, expanded from <cww@redhat.com>)
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index eda9d3e1..68cac4d9 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -22,7 +22,7 @@ need_config () [ -f "${CONFIG}" ] && return local addr=`get_hwaddr ${1}` if [ -n "$addr" ]; then - local nconfig=`fgrep -il "HWADDR=$addr" /etc/sysconfig/network-scripts/ifcfg-*` + local nconfig=`LANG=C grep -il "^[[:space:]]*HWADDR=$addr" /etc/sysconfig/network-scripts/ifcfg-*` if [ -n "$nconfig" ] ; then CONFIG=$nconfig [ -f "${CONFIG}" ] && return @@ -155,7 +155,7 @@ rename_device() { /sbin/nameif "$1" "$2" || { local hw2=`get_hwaddr ${1}` - local nconfig=`fgrep -il "HWADDR=$hw2" /etc/sysconfig/network-scripts/ifcfg-*` + local nconfig=`LANG=C grep -il "^[[:space:]]*HWADDR=$hw2" /etc/sysconfig/network-scripts/ifcfg-*` local dev= if [ -n "$nconfig" ]; then dev=$(. $nconfig ; echo $DEVICE) |