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
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."