]> git.proxmox.com Git - mirror_lxc.git/commitdiff
busybox template: mount fstab when available
authorBogdan Purcareata <bogdan.purcareata@freescale.com>
Mon, 20 Oct 2014 19:56:54 +0000 (15:56 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 22 Oct 2014 14:18:14 +0000 (09:18 -0500)
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@freescale.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-busybox.in

index ca2dd43486110fd25cdca737cf8487f3a281a6fc..ee54a7af27324a85249f170550a6f98f2392a95e 100644 (file)
@@ -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()