From: Dimitri John Ledkov Date: Fri, 13 Dec 2013 21:41:44 +0000 (+0000) Subject: lxc-ubuntu-cloud: Default to trying released channel X-Git-Tag: lxc-1.0.0.beta3~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b954f12173c382f7104a0e9464fa66dd3cade35;p=thirdparty%2Flxc.git lxc-ubuntu-cloud: Default to trying released channel This adds a fallback to the daily channel if an image couldn't be found in the released one. Signed-off-by: Dimitri John Ledkov Acked-by: Stéphane Graber --- diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in index 7a3c8c3fd..42ee563fe 100644 --- a/templates/lxc-ubuntu-cloud.in +++ b/templates/lxc-ubuntu-cloud.in @@ -189,7 +189,7 @@ hostarch=$arch cloud=0 locales=1 flushcache=0 -stream="released" +stream="tryreleased" cloneargs=() while true do @@ -252,8 +252,8 @@ if [ $hostarch = "armhf" -o $hostarch = "armel" ] && \ exit 1 fi -if [ "$stream" != "daily" -a "$stream" != "released" ]; then - echo "Only 'daily' and 'released' streams are supported" +if [ "$stream" != "daily" -a "$stream" != "released" -a "$stream" != "tryreleased" ]; then + echo "Only 'daily' and 'released' and 'tryreleased' streams are supported" exit 1 fi @@ -290,6 +290,11 @@ fi mkdir -p $cache +if [ "$stream" = "tryreleased" ]; then + stream=released + ubuntu-cloudimg-query $release $stream $arch 1>/dev/null 2>/dev/null || stream=daily +fi + if [ -n "$tarball" ]; then url2="$tarball" else