]> git.proxmox.com Git - mirror_lxc.git/commitdiff
lxc-ubuntu-cloud: Fix cache and lock location
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 16 Jan 2014 04:06:45 +0000 (23:06 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 16 Jan 2014 04:49:02 +0000 (23:49 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-ubuntu-cloud.in

index 2cf86c953934981e6b431cbe01f182ce33e964b5..7a3c8c3fd122c89b832f5128508d6c40b8d1a2bf 100644 (file)
@@ -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