]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-ubuntu-cloud: Never exit 0 when no container is created
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 5 Nov 2015 18:37:03 +0000 (13:37 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 6 Nov 2015 18:28:22 +0000 (13:28 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-ubuntu-cloud.in

index 5bdd758ed13d3442e4ac94fd94fae9be93a38bb4..e508408782a21aeac5a62c7b64012e4b1e3950c5 100644 (file)
@@ -200,7 +200,7 @@ cloneargs=()
 while true
 do
     case "$1" in
-    -h|--help)         usage $0 && exit 0;;
+    -h|--help)         usage $0 && exit 1;;
     -p|--path)         path=$2; shift 2;;
     -n|--name)         name=$2; shift 2;;
     -F|--flush-cache)  flushcache=1; shift 1;;
@@ -295,7 +295,7 @@ else
     if ! url1=`ubuntu-cloudimg-query $release $stream $arch --format "%{url}\n"`; then
         echo "There is no download available for release=$release, stream=$stream, arch=$arch"
         [ "$stream" = "daily" ] || echo "You may try with '--stream=daily'"
-        exit
+        exit 1
     fi
     url2=`echo $url1 | sed -e 's/.tar.gz/-root\0/' -e 's/.tar.gz/.tar.xz/'`
 fi