summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-02-14 19:15:09 +0100
committerThomas Bächler <thomas@archlinux.org>2010-02-14 19:15:09 +0100
commit6c5c4f4fa00a0fa06b930840ae3f491502040b72 (patch)
treea189f6fa659f1fa2322bce8e229b6fbe3974a413 /init
parent6f34c86e366fc2e8e2dc6a2979333c464dacc6d0 (diff)
downloadmkinitcpio-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.
Diffstat (limited to 'init')
-rw-r--r--init19
1 files 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"