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.
cleanup-cruft
Richard Yao 13 years ago
parent d7cf3689bf
commit 3ef477862d

@ -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

Loading…
Cancel
Save