diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2009-12-19 16:03:10 +0200 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2010-01-12 16:40:46 -0500 |
commit | b9bef01af3a42c87f213dfa825965e146b4b8966 (patch) | |
tree | a992ed745c1e361d9fa040484d4f300e4992973c /sysconfig/network-scripts/ifdown-eth | |
parent | 43a7ec311b56f0ba6b06c3d35a53990869153ed5 (diff) | |
download | initscripts-b9bef01af3a42c87f213dfa825965e146b4b8966.tar initscripts-b9bef01af3a42c87f213dfa825965e146b4b8966.tar.gz initscripts-b9bef01af3a42c87f213dfa825965e146b4b8966.tar.bz2 initscripts-b9bef01af3a42c87f213dfa825965e146b4b8966.tar.xz initscripts-b9bef01af3a42c87f213dfa825965e146b4b8966.zip |
Get rid of uses of deprecated egrep and fgrep.
Diffstat (limited to 'sysconfig/network-scripts/ifdown-eth')
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 6 |
1 files changed, 3 insertions, 3 deletions
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} } |