summaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-01-12 21:01:15 +0000
committerBill Nottingham <notting@redhat.com>2005-01-12 21:01:15 +0000
commit3520e4d042f05895a986fb61d03869b3f31d0d4c (patch)
tree170c7a62f9dcb02b5c30c1a92ec79be3ef61cf06 /sysconfig/network-scripts/network-functions
parentb3fa00bf7b302ee5bcc76e7864753c924c1aecb7 (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-functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 8037e5d7..414f6235 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)