mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 06:21:08 +00:00
fix lxc-ubuntu-cloud option parsing bugs
The -u shortopt matching --userdata was not specified, and when -L is found shift should have been by 1 not 2 since there is no optarg. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
b917ef7522
commit
6b1a07ba08
@ -131,7 +131,7 @@ EOF
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
options=$(getopt -o a:hp:r:n:Fi:CLS:T:ds: -l arch:,help,path:,release:,name:,flush-cache,hostid:,auth-key:,cloud,no_locales,tarball:,debug,stream:,userdata: -- "$@")
|
options=$(getopt -o a:hp:r:n:Fi:CLS:T:ds:u: -l arch:,help,path:,release:,name:,flush-cache,hostid:,auth-key:,cloud,no_locales,tarball:,debug,stream:,userdata: -- "$@")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
usage $(basename $0)
|
usage $(basename $0)
|
||||||
exit 1
|
exit 1
|
||||||
@ -189,7 +189,7 @@ do
|
|||||||
-u|--userdata) userdata=$2; shift 2;;
|
-u|--userdata) userdata=$2; shift 2;;
|
||||||
-C|--cloud) cloud=1; shift 1;;
|
-C|--cloud) cloud=1; shift 1;;
|
||||||
-S|--auth-key) auth_key=$2; shift 2;;
|
-S|--auth-key) auth_key=$2; shift 2;;
|
||||||
-L|--no_locales) locales=0; shift 2;;
|
-L|--no_locales) locales=0; shift 1;;
|
||||||
-T|--tarball) tarball=$2; shift 2;;
|
-T|--tarball) tarball=$2; shift 2;;
|
||||||
-d|--debug) debug=1; shift 1;;
|
-d|--debug) debug=1; shift 1;;
|
||||||
-s|--stream) stream=$2; shift 2;;
|
-s|--stream) stream=$2; shift 2;;
|
||||||
|
Loading…
Reference in New Issue
Block a user