- if [ ! -x ${DHCP_PROG} ]; then
- echo "Program \"${DHCP_PROG}\" is not executable."
- exit ${EXIT_CODE_FAILURE}
- fi
- cmd_run_log ${DHCP_PROG} ${DHCP_STOP} ${DEVICE} || exit ${EXIT_CODE_FAILURE}
-elif [ x${BOOTPROTO} = "xstatic" ]; then
- # Static configuration
- cmd_run_log ip addr flush ${DEVICE} &&
- cmd_run_log ip link set ${DEVICE} down || exit ${EXIT_CODE_FAILURE}
-elif [ x${BOOTPROTO} = "xpppoe" ]; then
- # PPPoE configuration
- cmd_run_log pppoe-stop
- cmd_run_log ip addr flush ${DEVICE} &&
- cmd_run_log ip link set ${DEVICE} down || exit ${EXIT_CODE_FAILURE}
-else
- exit 1
-fi
+ static)
+ ;;
+
+ pppoe)
+ cmd_run_log pppoe-stop
+ ;;
+
+ *)
+ echo "Invalid BOOTPROTO value: ${BOOTPROTO}"
+ exit ${EXIT_CODE_FAILURE}
+esac
+
+cmd_run_log ip addr flush ${DEVICE} || exit ${EXIT_CODE_FAILURE}
+cmd_run_log ip link set ${DEVICE} down || exit ${EXIT_CODE_FAILURE}