From 3ef477862d08c20628273c3c855bb78d6e417b25 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 19 Jul 2012 20:34:07 -0400 Subject: [PATCH] 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. --- defaults/linuxrc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 -- 2.26.2