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.purcare...@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

_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to