diff --git a/scripts/etc/init.d/rcS b/scripts/etc/init.d/rcS index dfb14717..b5fbd365 100755 --- a/scripts/etc/init.d/rcS +++ b/scripts/etc/init.d/rcS @@ -296,6 +296,12 @@ echo # depmod needs to update modules.dep before using modprobe depmod -a + +# coldplug modules +echo "Loading drivers." +find /sys/ -name modalias -print0 | xargs -0 sort -u -z | xargs -0 modprobe -abq +echo "Finished loading drivers." + if [ "$drivers_to_load" != "" ] ; then echo "Loading additional drivers." for driver in $drivers_to_load diff --git a/scripts/etc/mdev.conf b/scripts/etc/mdev.conf new file mode 100755 index 00000000..f4db01a7 --- /dev/null +++ b/scripts/etc/mdev.conf @@ -0,0 +1,18 @@ +# mdev.conf +# +# Provide user, group, and mode information for devices. If a regex matches +# the device name provided by sysfs, use the appropriate user:group and mode +# instead of the default 0:0 660. +# +# Syntax: +# [-]devicename_regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] +# [-]$ENVVAR=regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] +# [-]@maj,min[-min2] user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] +# +# [-]: do not stop on this match, continue reading mdev.conf +# =: move, >: move and create a symlink +# !: do not create device node +# @|$|*: run @cmd if $ACTION=add, $cmd if $ACTION=remove, *cmd in all cases + +# support module loading on hotplug +$MODALIAS=.* 0:0 660 @modprobe -b "$MODALIAS"