pkg: Add support for cold-plugged devices to init

mdev only supports hot-plug, ie devices which are added
after the kernel booted. For cold-plugged devices, ie devices
present when the kernel boots, we need to modprobe the drivers
differently. The additions to rc.init does just that.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer 2017-06-13 15:19:27 -07:00
parent c1950419ef
commit 4e4efcd985

View File

@ -75,6 +75,9 @@ done
mdev -s
# Load modules for cold-plugged devices (ie devices present on boot)
grep -h MODALIAS /sys/bus/*/devices/*/uevent | cut -d= -f2 | xargs modprobe -abq 2> /dev/null
# set hostname
if [ -s /etc/hostname ]
then