From: Richard Yao Date: Tue, 24 Apr 2012 07:23:53 +0000 (-0400) Subject: Serialize hotplug events to mimic udev X-Git-Tag: v3.4.31~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=51ad5c92ab0ccfe18023d6ba1287fe330f1862e6;p=genkernel.git Serialize hotplug events to mimic udev --- diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 5d523ab..4aad686 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -404,13 +404,6 @@ prompt_user(){ esac } -setup_hotplug() { - if [ "${KV_2_6_OR_GREATER}" ] - then - echo /sbin/mdev > /proc/sys/kernel/hotplug - fi -} - setup_slowusb() { # This function removes unset DO_slowusb if there is no usb-storage attached. # If noslowusb is set, skip this function diff --git a/defaults/linuxrc b/defaults/linuxrc index 23ec2b0..f6c0de5 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -277,13 +277,18 @@ mount_devfs # Mount sysfs mount_sysfs -# Setup hotplugging for firmware loading -setup_hotplug - # Start mdev if [ "${KV_2_6_OR_GREATER}" ] then good_msg 'Activating mdev' + + # Serialize hotplug events + touch /dev/mdev.seq + + # Setup hotplugging for firmware loading + echo /sbin/mdev > /proc/sys/kernel/hotplug + + # Setup mdev netlink socket daemon ( cd /sys && mdev -s ) || bad_msg "Failed to receive dynamic updates from mdev" fi