diff options
| author | Bill Nottingham <notting@redhat.com> | 2005-01-12 20:59:44 +0000 |
|---|---|---|
| committer | Bill Nottingham <notting@redhat.com> | 2005-01-12 20:59:44 +0000 |
| commit | 94f6553d759432f1ba17e651856edad29b6d57c4 (patch) | |
| tree | 5edb44c2835b6ecc98b07668f6e281b2481fe548 /sysconfig/network-scripts/network-functions | |
| parent | 01651de3f72bbc656eb5b3bb309319d568204f46 (diff) | |
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 5ba95735..2377a461 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 @@ -156,7 +156,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) |
