Commit 44464003 by Edvinas Klovas Committed by Serge Hallyn

archlinux template: fix lxc.root for btrfs backend

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: 's avatarEdvinas Klovas <edvinas@pnd.io> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 5f2ea8cf
...@@ -154,7 +154,7 @@ lxc.cgroup.devices.allow = c 5:2 rwm ...@@ -154,7 +154,7 @@ lxc.cgroup.devices.allow = c 5:2 rwm
lxc.cgroup.devices.allow = c 136:* rwm lxc.cgroup.devices.allow = c 136:* rwm
EOF 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 cat > "${config_path}/fstab" << EOF
sysfs sys sysfs defaults 0 0 sysfs sys sysfs defaults 0 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment