#!/bin/ash # # "coldplug" ensures every hardware device present has its driver loaded, # even if its hotplug event was ignored since it was too early in system # startup for hotplug processing to work. # # Those drivers will create /sys/class or /sys/block nodes that receive # normal udev processing through hotplug, leading to /dev node creation. # # Run this during system startup shortly after /dev has been initialized # using udevstart. if [ ! -d /sys/devices ] then exit 1 fi # "new style" kernel hotplug has module-init-tools do the thinking cd /sys/devices for DIR in $(find . -type d) do if [ -f $DIR/modalias -a ! -L $DIR/driver ] then modprobe -q $(cat $DIR/modalias) fi done # REVISIT this part goes away sometime in 2.6.18 when platform_device # gets full hotplug/modalias support cd /sys/devices/platform for DEV in * do if [ "$DEV" != "power" -a ! -L $DEV/driver ] then # some platform drivers will need a MODULE_ALIAS() modprobe -q $DEV fi done