Description: fix lxc-ubuntu-cloud option parsing bugs
 the -u shortopt matching --userdata was not specified, and when -L
 is found, there is no optarg so shift 1 not 2.
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
Ubuntu-bug: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1076031
Forwarded: yes

Index: lxc/templates/lxc-ubuntu-cloud.in
===================================================================
--- lxc.orig/templates/lxc-ubuntu-cloud.in	2012-11-26 10:12:13.063703856 -0600
+++ lxc/templates/lxc-ubuntu-cloud.in	2012-11-26 10:23:17.435679618 -0600
@@ -131,7 +131,7 @@
     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 @@
     -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;;
