From: Michael Tremer Date: Tue, 11 Aug 2015 22:28:20 +0000 (+0200) Subject: Show help for zone creation X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fnetwork.git;a=commitdiff_plain;h=2c37b88b70eabce09ea8bb30bcc92add597be1b7 Show help for zone creation If a too small number of arguments is passed, we will show a help page to create a new zone. Signed-off-by: Michael Tremer --- diff --git a/src/network b/src/network index b036f4e3..12e9742f 100644 --- a/src/network +++ b/src/network @@ -603,7 +603,7 @@ cli_zone() { case "${action}" in new) - zone_new $@ + cli_zone_new $@ ;; destroy) cli_zone_destroy $@ @@ -624,6 +624,15 @@ cli_zone() { fi } +cli_zone_new() { + if cli_help_requested $@ || [ $# -lt 2 ]; then + cli_show_man network-zone-new + exit ${EXIT_OK} + fi + + zone_new $@ +} + # Removes a zone either immediately, if it is currently down, # or adds a tag that the removal will be done when the zone # is brought down the next time.