1
Description: re-enable use of daily cloud images
2
There are two types of cloud images - released and daily ones. We were
3
always using daily ones, instead of using released by default with an
4
option for daily. Fix that.
5
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
8
Index: lxc/templates/lxc-ubuntu-cloud.in
9
===================================================================
10
--- lxc.orig/templates/lxc-ubuntu-cloud.in 2012-03-16 09:40:19.027008000 -0500
11
+++ lxc/templates/lxc-ubuntu-cloud.in 2012-03-16 09:49:47.882037866 -0500
13
[ -C | --cloud ]: Configure container for use with meta-data service, defaults to no
14
[ -T | --tarball ]: Location of tarball
15
[ -d | --debug ]: Run with 'set -x' to debug errors
16
+[ -s | --stream]: Use specified stream rather than 'released'
18
Options, mutually exclusive of "-C" and "--cloud":
19
[ -i | --hostid ]: HostID for cloud-init, defaults to random string
24
-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 -- "$@")
25
+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: -- "$@")
38
-L|--no_locales) locales=0; shift 2;;
39
-T|--tarball) tarball=$2; shift 2;;
40
-d|--debug) debug=1; shift 1;;
41
+ -s|--stream) stream=$2; shift 2;;
49
+if [ "$stream" != "daily" -a "$stream" != "released" ]; then
50
+ echo "Only 'daily' and 'released' streams are supported"
54
if [ -z "$path" ]; then
55
echo "'path' parameter is required"
58
if [ -n "$tarball" ]; then
61
- url1=`ubuntu-cloudimg-query $release released $arch --format "%{url}\n"`
62
+ url1=`ubuntu-cloudimg-query $release $stream $arch --format "%{url}\n"`
63
url2=`echo $url1 | sed -e 's/.tar.gz/-root\0/'`