# Process the given action
case "${action}" in
- config)
- cli_config $@
+ config|port|device|zone|start|stop|restart|status)
+ cli_${action} $@
;;
- device)
- cli_device $@
- ;;
-
- zone)
- cli_zone $@
- ;;
-
- start)
- cli_start $@
- ;;
-
- stop)
- cli_stop $@
- ;;
-
- restart)
- cli_restart $@
- ;;
-
- status)
- cli_status $@
- ;;
-
- ""|help)
+ ""|help|--help|-h)
cli_usage root
exit ${EXIT_OK}
;;
+
*)
- error "Invalid command given."
+ error "Invalid command given: ${action}"
cli_usage usage
exit ${EXIT_CONF_ERROR}
+ ;;
esac