summaryrefslogtreecommitdiff
path: root/multitech/recipes/ocg-scripts/ocg-scripts-1.0/ocg-dhcpd
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2013-12-20 15:09:49 -0600
committerJesse Gilles <jgilles@multitech.com>2013-12-20 15:09:49 -0600
commitc44aebe7016921035c41a95cd8989d55c2eb59a9 (patch)
tree4d01d0c2ea3b9f553c858ea8e4f4bacce855b283 /multitech/recipes/ocg-scripts/ocg-scripts-1.0/ocg-dhcpd
parente7f7fd594fe8974efc97f02884113b134617f854 (diff)
ocg-scripts: updated scripts with more options
ocg-cell-router: configurable LAN and WAN interface options ocg-wifi-ap: dhcpd config enhancements, bridge interface configurable
Diffstat (limited to 'multitech/recipes/ocg-scripts/ocg-scripts-1.0/ocg-dhcpd')
-rwxr-xr-xmultitech/recipes/ocg-scripts/ocg-scripts-1.0/ocg-dhcpd15
1 files changed, 11 insertions, 4 deletions
diff --git a/multitech/recipes/ocg-scripts/ocg-scripts-1.0/ocg-dhcpd b/multitech/recipes/ocg-scripts/ocg-scripts-1.0/ocg-dhcpd
index 575b803..cafc1be 100755
--- a/multitech/recipes/ocg-scripts/ocg-scripts-1.0/ocg-dhcpd
+++ b/multitech/recipes/ocg-scripts/ocg-scripts-1.0/ocg-dhcpd
@@ -10,11 +10,14 @@ do_stop() {
killall udhcpd
}
-# main
-if [[ $# -ne 1 ]]
-then
- echo "usage: $0 start|stop|restart"
+usage() {
+ echo "Usage: $(basename $0) start|stop|restart"
exit 1
+}
+
+# main
+if [[ $# != 1 ]]; then
+ usage
fi
case $1 in
@@ -31,8 +34,12 @@ case $1 in
;;
restart)
do_stop
+ sleep 1
do_start
;;
+ *)
+ usage
+ ;;
esac
exit 0