aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2021-01-28 12:31:57 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2021-01-28 12:32:09 -0600
commit12ee72a9b34ef33411cf1bfd5ea059676ee6e482 (patch)
treea4735db5994621889e0198de59272e2f649ef8bd
parent170ce2624a98952e6eb871cd9915c7c1b76ab887 (diff)
allow devfs to run on lxc
X-Gentoo-Bug: 761918 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=761918 Closes #272.
-rw-r--r--init.d/devfs.in24
1 files changed, 13 insertions, 11 deletions
diff --git a/init.d/devfs.in b/init.d/devfs.in
index 61ba45f8..548a0847 100644
--- a/init.d/devfs.in
+++ b/init.d/devfs.in
@@ -15,7 +15,7 @@ depend()
{
provide dev-mount
before dev
- keyword -docker -lxc -prefix -systemd-nspawn -vserver
+ keyword -docker -prefix -systemd-nspawn -vserver
}
mount_dev()
@@ -66,18 +66,20 @@ seed_dev()
{
# Seed /dev with some things that we know we need
- # creating /dev/console, /dev/tty and /dev/tty1 to be able to write
- # to $CONSOLE with/without bootsplash before udevd creates it
- [ -c /dev/console ] || mknod -m 600 /dev/console c 5 1
- [ -c /dev/tty1 ] || mknod -m 620 /dev/tty1 c 4 1
- [ -c /dev/tty ] || mknod -m 666 /dev/tty c 5 0
+ if [ "${RC_SYS}" != LXC ]; then
+ # creating /dev/console, /dev/tty and /dev/tty1 to be able to write
+ # to $CONSOLE with/without bootsplash before udevd creates it
+ [ -c /dev/console ] || mknod -m 600 /dev/console c 5 1
+ [ -c /dev/tty1 ] || mknod -m 620 /dev/tty1 c 4 1
+ [ -c /dev/tty ] || mknod -m 666 /dev/tty c 5 0
- # udevd will dup its stdin/stdout/stderr to /dev/null
- # and we do not want a file which gets buffered in ram
- [ -c /dev/null ] || mknod -m 666 /dev/null c 1 3
+ # udevd will dup its stdin/stdout/stderr to /dev/null
+ # and we do not want a file which gets buffered in ram
+ [ -c /dev/null ] || mknod -m 666 /dev/null c 1 3
- # so udev can add its start-message to dmesg
- [ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11
+ # so udev can add its start-message to dmesg
+ [ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11
+ fi
# extra symbolic links not provided by default
[ -e /dev/fd ] || ln -snf /proc/self/fd /dev/fd