processing of -w or -r shifts an argument that isn't there, messing up
other argument processing

Signed-off-by: Dwight Engen <dwight.en...@oracle.com>
---
 src/lxc/lxc-shutdown.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/lxc-shutdown.in b/src/lxc/lxc-shutdown.in
index edf735e..a033b10 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
 
-- 
1.7.11.7


------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to