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.
This commit is contained in:
William Hubbs 2021-01-28 12:31:57 -06:00
parent 170ce2624a
commit 12ee72a9b3

View File

@ -15,7 +15,7 @@ depend()
{ {
provide dev-mount provide dev-mount
before dev before dev
keyword -docker -lxc -prefix -systemd-nspawn -vserver keyword -docker -prefix -systemd-nspawn -vserver
} }
mount_dev() mount_dev()
@ -66,6 +66,7 @@ seed_dev()
{ {
# Seed /dev with some things that we know we need # Seed /dev with some things that we know we need
if [ "${RC_SYS}" != LXC ]; then
# creating /dev/console, /dev/tty and /dev/tty1 to be able to write # creating /dev/console, /dev/tty and /dev/tty1 to be able to write
# to $CONSOLE with/without bootsplash before udevd creates it # to $CONSOLE with/without bootsplash before udevd creates it
[ -c /dev/console ] || mknod -m 600 /dev/console c 5 1 [ -c /dev/console ] || mknod -m 600 /dev/console c 5 1
@ -78,6 +79,7 @@ seed_dev()
# so udev can add its start-message to dmesg # so udev can add its start-message to dmesg
[ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11 [ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11
fi
# extra symbolic links not provided by default # extra symbolic links not provided by default
[ -e /dev/fd ] || ln -snf /proc/self/fd /dev/fd [ -e /dev/fd ] || ln -snf /proc/self/fd /dev/fd