Serialize hotplug events to mimic udev
authorRichard Yao <ryao@cs.stonybrook.edu>
Tue, 24 Apr 2012 07:23:53 +0000 (03:23 -0400)
committerRichard Yao <ryao@cs.stonybrook.edu>
Tue, 24 Apr 2012 21:02:30 +0000 (17:02 -0400)
defaults/initrd.scripts
defaults/linuxrc

index 5d523abda23b38655ff384526867d6500ce69862..4aad686e8825959714e30a7d76b10a655a24bb24 100755 (executable)
@@ -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
index 23ec2b0538d7f05029a9e803a3da3328fc41909d..f6c0de52c6fa09dd1797b88adfec9cc5765395b3 100755 (executable)
@@ -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