From: Stéphane Graber Date: Thu, 5 Nov 2015 18:37:03 +0000 (-0500) Subject: lxc-ubuntu-cloud: Never exit 0 when no container is created X-Git-Tag: lxc-1.0.8~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=126ab9ffaaf5360132203cfb0beed70ed11a4e86;p=thirdparty%2Flxc.git lxc-ubuntu-cloud: Never exit 0 when no container is created Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in index 9b5da6d86..3f30a610a 100644 --- a/templates/lxc-ubuntu-cloud.in +++ b/templates/lxc-ubuntu-cloud.in @@ -204,7 +204,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;; @@ -297,7 +297,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