]> git.proxmox.com Git - mirror_lxc.git/commitdiff
archlinux template: fix lxc.root for btrfs backend
authorEdvinas Klovas <edvinas@pnd.io>
Sat, 10 May 2014 14:47:52 +0000 (16:47 +0200)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 13 May 2014 19:28:22 +0000 (15:28 -0400)
when using btrfs backend lxc-create first creates rootfs in /usr/lib/lxc/rootfs
directory before moving it to /var/lib/lxc or other directory supplied by the
command line. Archlinux template relied in $rootfs_path which made containers
created with btrfs backend have lxc.rootfs set to /usr/lib/lxc/rootfs. By using
$path instead of $rootfs_path we make sure that lxc.rootfs is always correct.

Signed-off-by: Edvinas Klovas <edvinas@pnd.io>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-archlinux.in

index d9fe42dce7fd148bd39e54ef09710893b28a4194..ec14a9a7bfb06e04e8d77a05f04703ed7948fff2 100755 (executable)
@@ -154,7 +154,7 @@ lxc.cgroup.devices.allow = c 5:2 rwm
 lxc.cgroup.devices.allow = c 136:* rwm
 EOF
 
-    grep -q "^lxc.rootfs" ${config_path}/config 2>/dev/null || echo "lxc.rootfs = ${rootfs_path}" >> ${config_path}/config
+    grep -q "^lxc.rootfs" ${config_path}/config 2>/dev/null || echo "lxc.rootfs = ${path}/rootfs" >> ${config_path}/config
 
     cat > "${config_path}/fstab" << EOF
 sysfs sys sysfs defaults 0 0