From 25f7d7fc6ae84bc15b47ae51d97aea5b99ad995f Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 12 Jan 2005 20:57:19 +0000 Subject: fix various fgreps to not catch commented lines (#136531, expanded from ) --- sysconfig/network-scripts/network-functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysconfig/network-scripts/network-functions') 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) -- cgit v1.2.1