aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-eth
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2009-12-19 15:57:03 +0200
committerBill Nottingham <notting@redhat.com>2010-01-12 17:09:10 -0500
commit265989c6fce9523b46aa9020f241ab2450307aa4 (patch)
tree168538aa78bb8280848af13978f56fef5caf2c05 /sysconfig/network-scripts/ifdown-eth
parentd4c58cd1c84f99030c3f4778d2c64377838e0634 (diff)
downloadinitscripts-265989c6fce9523b46aa9020f241ab2450307aa4.tar
initscripts-265989c6fce9523b46aa9020f241ab2450307aa4.tar.gz
initscripts-265989c6fce9523b46aa9020f241ab2450307aa4.tar.bz2
initscripts-265989c6fce9523b46aa9020f241ab2450307aa4.tar.xz
initscripts-265989c6fce9523b46aa9020f241ab2450307aa4.zip
Eliminate bunch of unnecessary stat calls and command invocations.
Diffstat (limited to 'sysconfig/network-scripts/ifdown-eth')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 05d44174..3399ee3c 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -105,7 +105,7 @@ if [ -d "/sys/class/net/${REALDEVICE}" ]; then
fi
[ "$retcode" = "0" ] && retcode=$?
-if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then
+if [ -n "${BRIDGE}" ] && [ -x /usr/sbin/brctl ]; then
/sbin/ip link set dev ${DEVICE} down
/usr/sbin/brctl delif ${BRIDGE} ${DEVICE}
# Upon removing a device from a bridge,
@@ -128,7 +128,7 @@ while ! check_device_down ${DEVICE} && [ "$waited" -lt 50 ] ; do
done
# don't leave an outdated key sitting around
-if [ -n "${WIRELESS_ENC_KEY}" -a -x /sbin/iwconfig ]; then
+if [ -n "${WIRELESS_ENC_KEY}" ] && [ -x /sbin/iwconfig ]; then
/sbin/iwconfig ${DEVICE} enc 0 >/dev/null 2>&1
fi
@@ -138,7 +138,7 @@ if [ "$retcode" = 0 ] ; then
# the interface went down.
fi
-if [ -n "$VLAN" -a -x /sbin/vconfig ]; then
+if [ -n "$VLAN" ] && [ -x /sbin/vconfig ]; then
# 802.1q VLAN
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