diff options
author | Thomas Bächler <thomas@archlinux.org> | 2010-02-14 19:15:09 +0100 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2010-02-14 19:15:09 +0100 |
commit | 6c5c4f4fa00a0fa06b930840ae3f491502040b72 (patch) | |
tree | a189f6fa659f1fa2322bce8e229b6fbe3974a413 | |
parent | 6f34c86e366fc2e8e2dc6a2979333c464dacc6d0 (diff) | |
download | mkinitcpio-6c5c4f4fa00a0fa06b930840ae3f491502040b72.tar.gz mkinitcpio-6c5c4f4fa00a0fa06b930840ae3f491502040b72.tar.xz |
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.
-rw-r--r-- | init | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -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" |