From: Dwight Engen Date: Wed, 9 Jan 2013 19:09:33 +0000 (-0500) Subject: fix lxc-shutdown argument parsing X-Git-Tag: lxc-0.9.0.alpha3~1^2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9f2c74c3da6823c2530a6078545f785d192076c;p=thirdparty%2Flxc.git fix lxc-shutdown argument parsing processing of -w or -r shifts an argument that isn't there, messing up other argument processing Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/lxc-shutdown.in b/src/lxc/lxc-shutdown.in index edf735e54..a033b1075 100644 --- a/src/lxc/lxc-shutdown.in +++ b/src/lxc/lxc-shutdown.in @@ -62,6 +62,7 @@ while [ $# -gt 0 ]; do case "$opt" in -h|--help) usage + exit 0 ;; -n|--name) optarg_check $opt "$1" @@ -70,11 +71,9 @@ while [ $# -gt 0 ]; do ;; -w|--wait) dowait=1 - shift ;; -r|--reboot) reboot=1 - shift ;; -t|--timeout) optarg_check $opt "$1" @@ -94,6 +93,7 @@ while [ $# -gt 0 ]; do *) usage_err "unknown option '$opt'" exit 1 + ;; esac done