[lxc-devel] [PATCH 2/2] busybox template: mount fstab when available

Serge Hallyn serge.hallyn at ubuntu.com
Wed Oct 22 14:16:39 UTC 2014


Quoting Bogdan Purcareata (bogdan.purcareata at freescale.com):
> 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 at freescale.com>

works fine for me, thanks.

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.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 at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list