From eed3f590c9db7cd9cd4d5fb4722fc7257a278ea6 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Thu, 1 Mar 2012 01:33:12 +0100 Subject: Code quality upgrade This is what you get when Dave Reisner points you at some bash anti-patterns. Also in this commit: - updated documentation - bugfix revision of the IPv6 SLAAC address/route bug --- src/connections/bond | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/connections/bond') diff --git a/src/connections/bond b/src/connections/bond index ea6af77..132225a 100644 --- a/src/connections/bond +++ b/src/connections/bond @@ -5,7 +5,7 @@ IFENSLAVE="/sbin/ifenslave" bond_up() { load_profile "$1" - if [ -e /sys/class/net/$INTERFACE ]; then + if [[ -e "/sys/class/net/$INTERFACE" ]]; then report_fail "Interface $INTERFACE already exists." exit 1 else @@ -31,12 +31,12 @@ bond_down() { "$CONN_DIR/ethernet" down "$1" bring_interface down "$INTERFACE" - ip link delete $INTERFACE &>/dev/null + ip link delete "$INTERFACE" &> /dev/null return 0 } bond_status() { - if [ -e /sys/class/net/$INTERFACE ]; then + if [[ -e "/sys/class/net/$INTERFACE" ]]; then return 0 else return 1 -- cgit v1.2.3-24-g4f1b