From 90f5bdd87fd86d0263e3a5f12f6e817da9d772e6 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 12 Jan 2005 21:03:36 +0000 Subject: fix various fgreps to not catch commented lines (#136531, expanded from ) --- sysconfig/network-scripts/ifup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sysconfig/network-scripts/ifup') diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index bfb1301b..17ad0804 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -185,7 +185,7 @@ fi if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then /sbin/ip link set dev ${DEVICE} down /sbin/ip link set dev ${DEVICE} up - for device in `fgrep -l "MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do + for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do if [ "$BOOTPROTO" = "dhcp" ]; then /sbin/ifup ${device##*/} fi @@ -296,7 +296,7 @@ else fi # Bonding initialization part II if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then - for device in `fgrep -l "MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do + for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do /sbin/ifup ${device##*/} done fi @@ -369,7 +369,7 @@ fi # Bonding initialization part II - for static, enslave the devices. For # DHCP, remove any routes for the slaves. if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then - for device in `fgrep -l "MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do + for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do if [ "$BOOTPROTO" = "dhcp" ]; then DEV=$DEVICE eval $(LANG=C fgrep "DEVICE=" $device) -- cgit v1.2.1