From: Richard Yao Date: Thu, 15 Mar 2012 21:45:04 +0000 (-0400) Subject: Reorder mdev initialization to mimic udev boot X-Git-Tag: v3.4.30~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=69009cb7475cd4067791f96747a09a26abf4742b;p=genkernel.git Reorder mdev initialization to mimic udev boot --- diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 8aad72b..5d523ab 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -298,7 +298,7 @@ run_shell() { /bin/ash } -runmdev() { +mount_devfs () { # Use devtmpfs if enabled in kernel, # else tmpfs. Always run mdev just in case devfs=tmpfs @@ -313,7 +313,6 @@ runmdev() { # http://git.busybox.net/busybox/plain/docs/mdev.txt mkdir -m 0755 /dev/pts mount -t devpts -o gid=5,mode=0620 devpts /dev/pts || bad_msg "Failed to mount /dev/pts" - mdev -s || bad_msg "Failed to receive dynamic updates from mdev" } test_success() { @@ -433,16 +432,6 @@ setup_slowusb() { done } -start_dev_mgr() { - if [ "${KV_2_6_OR_GREATER}" ] - then - cd /sys - good_msg 'Activating mdev' - runmdev - cd / - fi -} - cmdline_hwopts() { # Scan CMDLINE for any "doscsi" or "noscsi"-type arguments local FOUND diff --git a/defaults/linuxrc b/defaults/linuxrc index 3f13f77..7f68836 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -271,12 +271,24 @@ splash 'init' cmdline_hwopts +# Mount devfs +mount_devfs + # Mount sysfs mount_sysfs # Setup hotplugging for firmware loading setup_hotplug +# Start mdev +if [ "${KV_2_6_OR_GREATER}" ] +then + cd /sys + good_msg 'Activating mdev' + mdev -s || bad_msg "Failed to receive dynamic updates from mdev" + cd / +fi + # Load modules listed in MY_HWOPTS if /lib/modules exists for the running kernel if [ -z "${DO_modules}" ] then @@ -304,9 +316,6 @@ sdelay # Setup slow USB bits setup_slowusb -# Start device manager -start_dev_mgr - # if doslowusb is passed, pause other 10 seconds here, after mdev load [ "${DO_slowusb}" ] && sleep 10