From: Michael Tremer Date: Fri, 4 Jun 2010 01:17:00 +0000 (+0200) Subject: network: Add help for restart command. X-Git-Tag: 001~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcef495d930fd7d6c8d1aa4d868e1f4588a1c832;p=network.git network: Add help for restart command. --- diff --git a/functions.cli b/functions.cli index 21241512..14df652a 100644 --- a/functions.cli +++ b/functions.cli @@ -204,6 +204,20 @@ function cli_stop() { done } +function cli_restart() { + if cli_help_requested $@; then + cli_usage root-restart + exit ${EXIT_OK} + fi + + cli_stop $@ + + # Give the system some time to calm down + sleep 2 + + cli_start $@ +} + function cli_help_requested() { local argument for argument in $@; do @@ -224,6 +238,7 @@ function cli_usage() { echo echo " start - ..." echo " stop - ..." + echo " restart - ..." echo echo " config - ..." echo @@ -244,7 +259,7 @@ function cli_usage() { echo " ${0} ${what#root-} DEBUG=1 ..." echo ;; - root-start|root-stop) + root-start|root-stop|root-restart) echo "${0}: ${what#root-} [--local-only|--remote-only|--all|...]" echo echo " This commands ${what#root-}s all zones by default." diff --git a/network b/network index e586da7b..559630c3 100755 --- a/network +++ b/network @@ -59,8 +59,7 @@ case "${action}" in ;; restart) - cli_stop $@ - cli_start $@ + cli_restart $@ ;; show)