From: Stéphane Graber Date: Thu, 16 Jan 2014 04:06:45 +0000 (-0500) Subject: lxc-ubuntu-cloud: Fix cache and lock location X-Git-Tag: lxc-2.1.1~2013 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=9cde0368fbbfa61add2e73f8ccd5b00c1b0f2e08;p=mirror_lxc.git lxc-ubuntu-cloud: Fix cache and lock location 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 2cf86c953..7a3c8c3fd 100644 --- a/templates/lxc-ubuntu-cloud.in +++ b/templates/lxc-ubuntu-cloud.in @@ -283,8 +283,10 @@ type wget # determine the url, tarball, and directory names # download if needed cache="$STATE_DIR/cache/lxc/cloud-$release" -STATE_DIR="$HOME/.cache/lxc/" -cache="$HOME/.cache/lxc/cloud-$release" +if [ $in_userns -eq 1 ]; then + STATE_DIR="$HOME/.cache/lxc/" + cache="$HOME/.cache/lxc/cloud-$release" +fi mkdir -p $cache