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
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
......
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