From 6c5c4f4fa00a0fa06b930840ae3f491502040b72 Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Sun, 14 Feb 2010 19:15:09 +0100 Subject: Kill udev after mounting file systems, not before Slow devices like USB devices will be detected after we kill udev, thus booting will fail. Kill udev as the last step, directly before we umount /proc and /sys and run switch_root. --- init | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/init b/init index 182a54b..e860047 100644 --- a/init +++ b/init @@ -102,15 +102,6 @@ if [ -f "/message" ]; then msg "$(cat /message)" fi -#Special handling if udev is running -udevpid=$(/bin/pidof udevd) -if [ -n "${udevpid}" ]; then - # Settle pending uevents, then kill udev - /sbin/udevadm settle - /bin/kill -9 ${udevpid} > /dev/null 2>&1 - /bin/sleep 0.01 -fi - mkdir -p /new_root if [ -z "${nfsroot}" -a "${root}" != "/dev/nfs" ]; then if [ ${root:0:5} != "/dev/" ] || ! poll_device "${root}" ${rootdelay}; then @@ -188,6 +179,16 @@ else fi nfsmount ${nfs_option:+-o ${nfs_option}} "${nfs_server}:${nfs_path}" /new_root fi + +#Special handling if udev is running +udevpid=$(/bin/pidof udevd) +if [ -n "${udevpid}" ]; then + # Settle pending uevents, then kill udev + /sbin/udevadm settle + /bin/kill -9 ${udevpid} > /dev/null 2>&1 + /bin/sleep 0.01 +fi + umount /proc umount /sys [ -z "${init}" ] && init="/sbin/init" -- cgit v1.2.3-24-g4f1b