#!/sbin/runscript # Load hardware drivers start() { # check for boot option "nocoldplug" for i in `cat /proc/cmdline`; do case $i in modules=*) MODULES="`echo ${i#modules=} | tr ',' ' '`";; noautodetect) AUTODETECT=no;; esac done if [ "$MODULES" ] || [ "$AUTODETECT" != no ] ; then ebegin "Loading hardware drivers" else ebegin "Skipping hardware drivers" eend return fi [ "$MODULES" ] && modprobe $MODULES 2> /dev/null if [ "$AUTODETECT" != no ] ; then find /sys -name modalias | xargs sort | while read a ; do modprobe $a 2>/dev/null \ || echo $a >> /tmp/hwdrivers.failed done fi eend 0 }