From b9bef01af3a42c87f213dfa825965e146b4b8966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 19 Dec 2009 16:03:10 +0200 Subject: Get rid of uses of deprecated egrep and fgrep. --- sysconfig/network-scripts/ifdown-eth | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sysconfig/network-scripts/ifdown-eth') diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 1ca6a6f2..05d44174 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -37,7 +37,7 @@ if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then if [ -n "${FOUNDMACADDR}" -a "${FOUNDMACADDR}" != "${HWADDR}" ]; then NEWCONFIG=$(get_config_by_hwaddr ${FOUNDMACADDR}) if [ -n "${NEWCONFIG}" ]; then - eval $(LANG=C fgrep "DEVICE=" $NEWCONFIG) + eval $(LANG=C grep -F "DEVICE=" $NEWCONFIG) else echo $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring." exit 1 @@ -140,8 +140,8 @@ fi if [ -n "$VLAN" -a -x /sbin/vconfig ]; then # 802.1q VLAN - if echo ${DEVICE} | LANG=C egrep -v '(:)' | LANG=C egrep -q '(eth|bond)[0-9][0-9]*\.[0-9][0-9]?[0-9]?[0-9]?' \ - || echo ${DEVICE} | LANG=C egrep -q 'vlan[0-9][0-9]?[0-9]?[0-9]?' ; then + if echo ${DEVICE} | LANG=C grep -Ev '(:)' | LANG=C grep -Eq '(eth|bond)[0-9][0-9]*\.[0-9][0-9]?[0-9]?[0-9]?' \ + || echo ${DEVICE} | LANG=C grep -Eq 'vlan[0-9][0-9]?[0-9]?[0-9]?' ; then [ -f /proc/net/vlan/${DEVICE} ] && { /sbin/vconfig rem ${DEVICE} } -- cgit v1.2.1