From 12c3b43fbeacd9cc471adf565ecea3263e37e353 Mon Sep 17 00:00:00 2001 From: Bogdan Purcareata Date: Mon, 20 Oct 2014 15:56:54 -0400 Subject: [PATCH] busybox template: mount fstab when available 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 Acked-by: Serge E. Hallyn --- templates/lxc-busybox.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in index ca2dd4348..ee54a7af2 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()