]> 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, 16 Jan 2015 00:08:47 +0000 (19:08 -0500)
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 6fc5d2ea455093e6f500c940f6bd009d5d12101c..2d6b1cb60d2157aee06d7d46b0363164d120cf93 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)