1 |
commit: 51ad5c92ab0ccfe18023d6ba1287fe330f1862e6 |
2 |
Author: Richard Yao <ryao <AT> cs <DOT> stonybrook <DOT> edu> |
3 |
AuthorDate: Tue Apr 24 07:23:53 2012 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 24 21:02:30 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=51ad5c92 |
7 |
|
8 |
Serialize hotplug events to mimic udev |
9 |
|
10 |
--- |
11 |
defaults/initrd.scripts | 7 ------- |
12 |
defaults/linuxrc | 11 ++++++++--- |
13 |
2 files changed, 8 insertions(+), 10 deletions(-) |
14 |
|
15 |
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts |
16 |
index 5d523ab..4aad686 100755 |
17 |
--- a/defaults/initrd.scripts |
18 |
+++ b/defaults/initrd.scripts |
19 |
@@ -404,13 +404,6 @@ prompt_user(){ |
20 |
esac |
21 |
} |
22 |
|
23 |
-setup_hotplug() { |
24 |
- if [ "${KV_2_6_OR_GREATER}" ] |
25 |
- then |
26 |
- echo /sbin/mdev > /proc/sys/kernel/hotplug |
27 |
- fi |
28 |
-} |
29 |
- |
30 |
setup_slowusb() { |
31 |
# This function removes unset DO_slowusb if there is no usb-storage attached. |
32 |
# If noslowusb is set, skip this function |
33 |
|
34 |
diff --git a/defaults/linuxrc b/defaults/linuxrc |
35 |
index 23ec2b0..f6c0de5 100755 |
36 |
--- a/defaults/linuxrc |
37 |
+++ b/defaults/linuxrc |
38 |
@@ -277,13 +277,18 @@ mount_devfs |
39 |
# Mount sysfs |
40 |
mount_sysfs |
41 |
|
42 |
-# Setup hotplugging for firmware loading |
43 |
-setup_hotplug |
44 |
- |
45 |
# Start mdev |
46 |
if [ "${KV_2_6_OR_GREATER}" ] |
47 |
then |
48 |
good_msg 'Activating mdev' |
49 |
+ |
50 |
+ # Serialize hotplug events |
51 |
+ touch /dev/mdev.seq |
52 |
+ |
53 |
+ # Setup hotplugging for firmware loading |
54 |
+ echo /sbin/mdev > /proc/sys/kernel/hotplug |
55 |
+ |
56 |
+ # Setup mdev netlink socket daemon |
57 |
( cd /sys && mdev -s ) || bad_msg "Failed to receive dynamic updates from mdev" |
58 |
fi |