From 2c37b88b70eabce09ea8bb30bcc92add597be1b7 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 12 Aug 2015 00:28:20 +0200 Subject: [PATCH] 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 --- src/network | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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. -- 2.39.2