[lxc-devel] [PATCH] busybox template: set mode when creating device nodes
Stéphane Graber
stgraber at ubuntu.com
Fri Dec 6 21:57:45 UTC 2013
On Fri, Dec 06, 2013 at 04:47:26PM -0500, Dwight Engen wrote:
> ensure mode 666 is set for tty1 and tty5
>
> Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
> templates/lxc-busybox.in | 22 +++++++++-------------
> 1 file changed, 9 insertions(+), 13 deletions(-)
>
> diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
> index 23d654e..97614c6 100644
> --- a/templates/lxc-busybox.in
> +++ b/templates/lxc-busybox.in
> @@ -72,19 +72,15 @@ $rootfs/usr/lib64"
> echo "/dev/$dev dev/$dev none bind 0 0" >> $path/fstab
> done
> else
> - mknod tty c 5 0 || res=1
> - mknod console c 5 1 || res=1
> - chmod 666 tty console || res=1
> - mknod tty0 c 4 0 || res=1
> - mknod tty1 c 4 0 || res=1
> - mknod tty5 c 4 0 || res=1
> - chmod 666 tty0 || res=1
> - mknod ram0 b 1 0 || res=1
> - chmod 600 ram0 || res=1
> - mknod null c 1 3 || res=1
> - chmod 666 null || res=1
> - mknod urandom c 1 9 || res=1
> - chmod 666 urandom || res=1
> + mknod -m 666 tty c 5 0 || res=1
> + mknod -m 666 console c 5 1 || res=1
> + mknod -m 666 tty0 c 4 0 || res=1
> + mknod -m 666 tty1 c 4 0 || res=1
> + mknod -m 666 tty5 c 4 0 || res=1
> + mknod -m 600 ram0 b 1 0 || res=1
> + mknod -m 666 null c 1 3 || res=1
> + mknod -m 666 zero c 1 5 || res=1
> + mknod -m 666 urandom c 1 9 || res=1
> fi
>
> popd > /dev/null
> --
> 1.8.3.1
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20131206/4c0dd3a0/attachment.pgp>
More information about the lxc-devel
mailing list