Commit 4b954f12 by Dimitri John Ledkov Committed by Stéphane Graber

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: 's avatarDimitri John Ledkov <dimitri.ledkov@canonical.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 89addaa7
...@@ -189,7 +189,7 @@ hostarch=$arch ...@@ -189,7 +189,7 @@ hostarch=$arch
cloud=0 cloud=0
locales=1 locales=1
flushcache=0 flushcache=0
stream="released" stream="tryreleased"
cloneargs=() cloneargs=()
while true while true
do do
...@@ -252,8 +252,8 @@ if [ $hostarch = "armhf" -o $hostarch = "armel" ] && \ ...@@ -252,8 +252,8 @@ if [ $hostarch = "armhf" -o $hostarch = "armel" ] && \
exit 1 exit 1
fi fi
if [ "$stream" != "daily" -a "$stream" != "released" ]; then if [ "$stream" != "daily" -a "$stream" != "released" -a "$stream" != "tryreleased" ]; then
echo "Only 'daily' and 'released' streams are supported" echo "Only 'daily' and 'released' and 'tryreleased' streams are supported"
exit 1 exit 1
fi fi
...@@ -290,6 +290,11 @@ fi ...@@ -290,6 +290,11 @@ fi
mkdir -p $cache 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 if [ -n "$tarball" ]; then
url2="$tarball" url2="$tarball"
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment