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 <bogdan.purcareata@freescale.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Bogdan Purcareata 2014-10-20 15:56:54 -04:00 committed by Serge Hallyn
parent a542dd3c1a
commit 12c3b43fbe

View 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()