From 51ad5c92ab0ccfe18023d6ba1287fe330f1862e6 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Tue, 24 Apr 2012 03:23:53 -0400 Subject: [PATCH] Serialize hotplug events to mimic udev --- defaults/initrd.scripts | 7 ------- defaults/linuxrc | 11 ++++++++--- 2 files changed, 8 insertions(+), 10 deletions(-) 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 -- 2.26.2