[lxc-devel] [lxc/master] Devices created in rootfs instead of rootfs/dev
Rachid-Koucha on Github
lxc-bot at linuxcontainers.org
Tue May 7 14:03:15 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 392 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190507/61622522/attachment.bin>
-------------- next part --------------
From 28eb86bd4391b5cebe0b92ceea70eb5e57c92285 Mon Sep 17 00:00:00 2001
From: Rachid Koucha <47061324+Rachid-Koucha at users.noreply.github.com>
Date: Tue, 7 May 2019 16:03:02 +0200
Subject: [PATCH] Devices created in rootfs instead of rootfs/dev
Added /dev in the mknod commands.
Signed-off-by: Rachid Koucha <rachid.koucha at gmail.com>
---
templates/lxc-busybox.in | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
index 3782687a54..7f93ee4077 100644
--- a/templates/lxc-busybox.in
+++ b/templates/lxc-busybox.in
@@ -89,15 +89,15 @@ ${rootfs}/usr/lib64"
echo "lxc.mount.entry = /dev/${dev} dev/${dev} none bind,optional,create=file 0 0" >> "${path}/config"
done
else
- mknod -m 666 "${rootfs}/tty" c 5 0 || res=1
- mknod -m 666 "${rootfs}/console" c 5 1 || res=1
- mknod -m 666 "${rootfs}/tty0" c 4 0 || res=1
- mknod -m 666 "${rootfs}/tty1" c 4 0 || res=1
- mknod -m 666 "${rootfs}/tty5" c 4 0 || res=1
- mknod -m 600 "${rootfs}/ram0" b 1 0 || res=1
- mknod -m 666 "${rootfs}/null" c 1 3 || res=1
- mknod -m 666 "${rootfs}/zero" c 1 5 || res=1
- mknod -m 666 "${rootfs}/urandom" c 1 9 || res=1
+ mknod -m 666 "${rootfs}/dev/tty" c 5 0 || res=1
+ mknod -m 666 "${rootfs}/dev/console" c 5 1 || res=1
+ mknod -m 666 "${rootfs}/dev/tty0" c 4 0 || res=1
+ mknod -m 666 "${rootfs}/dev/tty1" c 4 0 || res=1
+ mknod -m 666 "${rootfs}/dev/tty5" c 4 0 || res=1
+ mknod -m 600 "${rootfs}/dev/ram0" b 1 0 || res=1
+ mknod -m 666 "${rootfs}/dev/null" c 1 3 || res=1
+ mknod -m 666 "${rootfs}/dev/zero" c 1 5 || res=1
+ mknod -m 666 "${rootfs}/dev/urandom" c 1 9 || res=1
fi
# root user defined
More information about the lxc-devel
mailing list