From: Richard Yao Date: Fri, 20 Jul 2012 00:34:07 +0000 (-0400) Subject: Run mdev -s after modules are loaded X-Git-Tag: v3.4.39~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3ef477862d08c20628273c3c855bb78d6e417b25;p=genkernel.git Run mdev -s after modules are loaded Running `mdev -s` will ensure that device nodes are properly initialized. It does not function as a netlink hotplug daemon. We must run it after the modules are loaded to ensure that /dev/zfs has been created before userland programs attempt to use it. --- diff --git a/defaults/linuxrc b/defaults/linuxrc index 90099c8..f434339 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -293,7 +293,7 @@ mount_devfs # Mount sysfs mount_sysfs -# Start mdev +# Initialize mdev if [ "${KV_2_6_OR_GREATER}" ] then good_msg 'Activating mdev' @@ -303,9 +303,6 @@ then # 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 # Load modules listed in MY_HWOPTS if /lib/modules exists for the running kernel @@ -329,6 +326,12 @@ else good_msg 'Skipping module load; no modules in the ramdisk!' fi +# Ensure that device nodes are properly configured +if [ "${KV_2_6_OR_GREATER}" ] +then + mdev -s || bad_msg "mdev -s failed" +fi + # Apply scan delay if specified sdelay