-Added force ABI=32 in gmp package, stage2. It seems Intel Atom has a problem and...
[hvlinux.git] / stage2 / bootscripts / ifdown
index cc0951a..115c488 100755 (executable)
@@ -23,7 +23,13 @@ check_brctl()
     fi
 }
 
-if [ "$BOOTPROTO" == "dhcp" ]; then
+# First make sure interface is available
+if ! ip link show ${DEVICE} ; then
+    echo "Interface ${DEVICE} not available"
+    exit ${EXIT_CODE_WARNING}
+fi
+
+if [ "x${BOOTPROTO}" = "xdhcp" ]; then
     # DHCP configuration
 
     # Load DHCP client parameters
@@ -54,7 +60,7 @@ if [ -n "${BRIDGE_TO}" ]; then
 fi
 
 # Determining if the interface is a bridge:
-if [ "x${BRIDGE}" == "xyes" ]; then
+if [ "x${BRIDGE}" = "xyes" ]; then
     # Check that the brctl program is present and executable.
     if [ ! -x ${BRCTL} ]; then
         msg_log "*** ERROR: /usr/sbin/brctl not found."