]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-download: make --list more useful.
authorMichael Adam <obnox@samba.org>
Thu, 15 Jan 2015 23:14:15 +0000 (00:14 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 30 Jan 2015 08:58:21 +0000 (09:58 +0100)
Make it possible to use --list without having to specify
--dist, --release, and --arch, which does not make a lot
of sense.

Signed-off-by: Michael Adam <obnox@samba.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-download.in

index f6f50d8a91074080ea026a7dd02d4c1924e1e320..f67fdbc9598ce0d0ebe1df85be65c04d78cb180a 100644 (file)
@@ -266,8 +266,10 @@ fi
 
 # Check that we have all variables we need
 if [ -z "$LXC_NAME" ] || [ -z "$LXC_PATH" ] || [ -z "$LXC_ROOTFS" ]; then
-    echo "ERROR: Not running through LXC." 1>&2
-    exit 1
+    if [ "$DOWNLOAD_LIST_IMAGES" != "true" ]; then
+        echo "ERROR: Not running through LXC." 1>&2
+        exit 1
+    fi
 fi
 
 USERNS=$(in_userns)