[lxc-devel] [PATCH 2/2] busybox template: mount fstab when available
Bogdan Purcareata
bogdan.purcareata at freescale.com
Mon Oct 20 19:56:54 UTC 2014
When running unprivileged, lxc-create will touch a fstab file, with bind-mounts
for the ttys and other devices. Add this entry in the container config.
Signed-off-by: Bogdan Purcareata <bogdan.purcareata at freescale.com>
---
templates/lxc-busybox.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
index ca2dd43..ee54a7a 100644
--- a/templates/lxc-busybox.in
+++ b/templates/lxc-busybox.in
@@ -301,6 +301,10 @@ EOF
done
echo "lxc.mount.entry = /sys/kernel/security sys/kernel/security none ro,bind,optional 0 0" >>$path/config
echo "lxc.mount.auto = proc:mixed sys" >>$path/config
+
+ if [ -f "$path/fstab" ]; then
+ echo "lxc.mount = $path/fstab" >>$path/config
+ fi
}
remap_userns()
--
1.9.rc1
More information about the lxc-devel
mailing list