mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-06-07 10:26:57 +00:00
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 <dwight.engen@oracle.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
7af3759fea
commit
e9f2c74c3d
@ -62,6 +62,7 @@ while [ $# -gt 0 ]; do
|
|||||||
case "$opt" in
|
case "$opt" in
|
||||||
-h|--help)
|
-h|--help)
|
||||||
usage
|
usage
|
||||||
|
exit 0
|
||||||
;;
|
;;
|
||||||
-n|--name)
|
-n|--name)
|
||||||
optarg_check $opt "$1"
|
optarg_check $opt "$1"
|
||||||
@ -70,11 +71,9 @@ while [ $# -gt 0 ]; do
|
|||||||
;;
|
;;
|
||||||
-w|--wait)
|
-w|--wait)
|
||||||
dowait=1
|
dowait=1
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-r|--reboot)
|
-r|--reboot)
|
||||||
reboot=1
|
reboot=1
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-t|--timeout)
|
-t|--timeout)
|
||||||
optarg_check $opt "$1"
|
optarg_check $opt "$1"
|
||||||
@ -94,6 +93,7 @@ while [ $# -gt 0 ]; do
|
|||||||
*)
|
*)
|
||||||
usage_err "unknown option '$opt'"
|
usage_err "unknown option '$opt'"
|
||||||
exit 1
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user