From 9cde0368fbbfa61add2e73f8ccd5b00c1b0f2e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Wed, 15 Jan 2014 23:06:45 -0500 Subject: [PATCH] lxc-ubuntu-cloud: Fix cache and lock location MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- templates/lxc-ubuntu-cloud.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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