Skip to content

Commit

Permalink
busybox template: mount fstab when available
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bogdan Purcareata authored and stgraber committed Nov 25, 2014
1 parent c3c0a8b commit 2712570
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/lxc-busybox.in
Expand Up @@ -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()
Expand Down

0 comments on commit 2712570

Please sign in to comment.