From b2ef52cf983f51758502b3300e701214a05fabce Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Mon, 17 Apr 2006 15:07:57 +0000 Subject: [PATCH] Added patch from Mike Auty for udev 088+. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@382 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- gen_compile.sh | 2 +- generic/initrd.scripts | 19 ++++++++++++++++--- generic/linuxrc | 13 ------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/gen_compile.sh b/gen_compile.sh index 2c8f88b..4772e10 100644 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -888,7 +888,7 @@ compile_udev() { # We are going to install our files by hand. Why are we doing this? # Well, the udev ebuild does so, and I tend to think that Greg # Kroah-Hartman knows what he's doing with regards to udev. - for i in udev udevd udevsend udevstart + for i in udev udevd udevsend udevstart udevtrigger do install -D $i "${TEMP}/udev/sbin" done diff --git a/generic/initrd.scripts b/generic/initrd.scripts index 034e26f..01c198b 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -226,8 +226,21 @@ runUdev() { mount -t tmpfs -o size=100k udev /dev mkdir /dev/pts mkdir /dev/shm - echo /sbin/udevsend > /proc/sys/kernel/hotplug - /sbin/udevstart + echo > /proc/sys/kernel/hotplug + /sbin/udevd --daemon + mkdir -p /dev/.udev/queue + /sbin/udevtrigger + + good_msg 'Letting udev process events' + loop=0 + while test -d /dev/.udev/queue; do + sleep 1; + test "$loop" -gt 30 && break + loop=$(($loop + 1)) + done + good_msg "Udev finished proccsing after $loop iterations" + + killall udevd > /dev/null 2>&1 ln -snf /proc/self/fd /dev/fd ln -snf /proc/self/fd/0 /dev/stdin ln -snf /proc/self/fd/1 /dev/stdout @@ -272,7 +285,7 @@ bind_mount_dev() { start_dev_mgr() { # Check udev is available... - if [ "${KV_2_6_OR_GREATER}" -a ! "${USE_UDEV_NORMAL}" -eq '0' -a -x /sbin/udev ] + if [ "${KV_2_6_OR_GREATER}" -a ! "${USE_UDEV_NORMAL}" -eq '0' -a -x /sbin/udevtrigger ] then USE_UDEV_NORMAL=1 else diff --git a/generic/linuxrc b/generic/linuxrc index a3b65bf..e58c164 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -39,19 +39,6 @@ then [ -e /linuxrc ] && rm /linuxrc - if [ -e /sbin/udev ] - then - if [ ! -e /sbin/udevstart ] - then - ln -s /sbin/udev /sbin/udevstart - fi - - if [ ! -e /sbin/udevsend ] - then - ln -s /sbin/udev /sbin/udevsend - fi - fi - if [ -e /bin/lvm ] then ln -s /bin/lvm /bin/vgscan -- 2.26.2