]> git.ipfire.org Git - people/arne_f/network.git/blobdiff - network
network: Magnificent changes on code.
[people/arne_f/network.git] / network
diff --git a/network b/network
index 6787420b5eb7f98bac065f3d852f0fb472796e6e..e315b19ada70208e9a026fa16953ef6c15208051 100755 (executable)
--- a/network
+++ b/network
@@ -38,40 +38,18 @@ done
 
 # 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