Reorder mdev initialization to mimic udev boot

cleanup-cruft
Richard Yao 13 years ago committed by Sebastian Pipping
parent f5f3d6fa87
commit 69009cb747

@ -298,7 +298,7 @@ run_shell() {
/bin/ash /bin/ash
} }
runmdev() { mount_devfs () {
# Use devtmpfs if enabled in kernel, # Use devtmpfs if enabled in kernel,
# else tmpfs. Always run mdev just in case # else tmpfs. Always run mdev just in case
devfs=tmpfs devfs=tmpfs
@ -313,7 +313,6 @@ runmdev() {
# http://git.busybox.net/busybox/plain/docs/mdev.txt # http://git.busybox.net/busybox/plain/docs/mdev.txt
mkdir -m 0755 /dev/pts mkdir -m 0755 /dev/pts
mount -t devpts -o gid=5,mode=0620 devpts /dev/pts || bad_msg "Failed to mount /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() { test_success() {
@ -433,16 +432,6 @@ setup_slowusb() {
done done
} }
start_dev_mgr() {
if [ "${KV_2_6_OR_GREATER}" ]
then
cd /sys
good_msg 'Activating mdev'
runmdev
cd /
fi
}
cmdline_hwopts() { cmdline_hwopts() {
# Scan CMDLINE for any "doscsi" or "noscsi"-type arguments # Scan CMDLINE for any "doscsi" or "noscsi"-type arguments
local FOUND local FOUND

@ -271,12 +271,24 @@ splash 'init'
cmdline_hwopts cmdline_hwopts
# Mount devfs
mount_devfs
# Mount sysfs # Mount sysfs
mount_sysfs mount_sysfs
# Setup hotplugging for firmware loading # Setup hotplugging for firmware loading
setup_hotplug 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 # Load modules listed in MY_HWOPTS if /lib/modules exists for the running kernel
if [ -z "${DO_modules}" ] if [ -z "${DO_modules}" ]
then then
@ -304,9 +316,6 @@ sdelay
# Setup slow USB bits # Setup slow USB bits
setup_slowusb setup_slowusb
# Start device manager
start_dev_mgr
# if doslowusb is passed, pause other 10 seconds here, after mdev load # if doslowusb is passed, pause other 10 seconds here, after mdev load
[ "${DO_slowusb}" ] && sleep 10 [ "${DO_slowusb}" ] && sleep 10

Loading…
Cancel
Save