aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'templates/lxc-ubuntu-cloud.in')
-rw-r--r--templates/lxc-ubuntu-cloud.in13
1 files changed, 10 insertions, 3 deletions
diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in
index 1a61c7d..267dbab 100644
--- a/templates/lxc-ubuntu-cloud.in
+++ b/templates/lxc-ubuntu-cloud.in
@@ -104,18 +104,19 @@ Generic Options
[ -a | --arch ]: Arhcitecture of container, defaults to host arcitecture
[ -C | --cloud ]: Configure container for use with meta-data service, defaults to no
[ -T | --tarball ]: Location of tarball
+[ -d | --debug ]: Run with 'set -x' to debug errors
Options, mutually exclusive of "-C" and "--cloud":
[ -i | --hostid ]: HostID for cloud-init, defaults to random string
[ -u | --userdata ]: Cloud-init user-data file to configure container on start
- [ -S | --auth_key ]: SSH Public key file to inject into container
+ [ -S | --auth-key ]: SSH Public key file to inject into container
[ -L | --nolocales ]: Do not copy host's locales into container
EOF
return 0
}
-options=$(getopt -o a:hp:r:n:Fi:CLS:T: -l arch:,help,path:,release:,name:,flush-cache,hostid:,auth-key:,cloud,no_locales,tarball: -- "$@")
+options=$(getopt -o a:hp:r:n:Fi:CLS:T:d -l arch:,help,path:,release:,name:,flush-cache,hostid:,auth-key:,cloud,no_locales,tarball:,debug -- "$@")
if [ $? -ne 0 ]; then
usage $(basename $0)
exit 1
@@ -150,6 +151,7 @@ else
fi
fi
+debug=0
hostarch=$arch
cloud=0
locales=1
@@ -166,14 +168,19 @@ do
-i|--hostid) host_id=$2; shift 2;;
-u|--userdata) userdata=$2; shift 2;;
-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;;
-T|--tarball) tarball=$2; shift 2;;
+ -d|--debug) debug=1; shift 1;;
--) shift 1; break ;;
*) break ;;
esac
done
+if [ $debug -eq ]; then
+ set -x
+fi
+
if [ "$arch" == "i686" ]; then
arch=i386
fi