[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lxc-devel
Subject:    [lxc-devel] [PATCH 1/1] fix lxc-ubuntu-cloud option parsing bugs
From:       stgraber () ubuntu ! com (=?ISO-8859-1?Q?St=E9phane_Graber?=)
Date:       2012-11-26 20:11:35
Message-ID: 50B3CCF7.60909 () ubuntu ! com
[Download RAW message or body]

On 11/26/2012 03:08 PM, Serge Hallyn wrote:
> 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 at ubuntu.com>

Acked-by: St?phane Graber <stgraber at ubuntu.com>

Pushed to staging. Thanks

> ---
> templates/lxc-ubuntu-cloud.in |    4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in
> index 8df05da..300b47d 100644
> --- a/templates/lxc-ubuntu-cloud.in
> +++ b/templates/lxc-ubuntu-cloud.in
> @@ -131,7 +131,7 @@ EOF
> 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
> usage $(basename $0)
> exit 1
> @@ -189,7 +189,7 @@ do
> -u|--userdata)     userdata=$2; shift 2;;
> -C|--cloud)        cloud=1; shift 1;;
> -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;;
> -d|--debug)        debug=1; shift 1;;
> -s|--stream)       stream=$2; shift 2;;
> 


-- 
St?phane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20121126/16ef5615/attachment.pgp>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic