summaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-xsysconfig/network-scripts/ifup10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 251d7b3b..22cc3c64 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -97,11 +97,11 @@ if [ -n "${HWADDR}" ]; then
FOUNDMACADDR=`LC_ALL= LANG= ip -o link show ${REALDEVICE} | \
sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'`
if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
- NEWCONFIG=`fgrep -l "HWADDR=${HWADDR}" /etc/sysconfig/network-scripts/ifcfg-*`
+ NEWCONFIG=`LANG=C grep -l "^[[:space:]]*HWADDR=${HWADDR}" /etc/sysconfig/network-scripts/ifcfg-*`
if [ -n "${NEWCONFIG}" -a "`basename ${NEWCONFIG}`" != "${CONFIG}" ]; then
exec /sbin/ifup ${NEWCONFIG}
fi
- NEWCONFIG=`fgrep -l "HWADDR=${HWADDR}" /etc/sysconfig/networking/default/ifcfg-*`
+ NEWCONFIG=`LANG=C grep -l "^[[:space:]]*HWADDR=${HWADDR}" /etc/sysconfig/networking/default/ifcfg-*`
if [ -n "${NEWCONFIG}" -a "`basename ${NEWCONFIG}`" != "${CONFIG}" ]; then
exec /sbin/ifup ${NEWCONFIG}
else
@@ -130,7 +130,7 @@ fi
if [ "${TYPE}" = "Bonding" -o "$DEVICETYPE" = "bond" ] || 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
@@ -207,7 +207,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
@@ -282,7 +282,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)