From 4e4efcd985be595233b3368c20def41eb0e3ca2d Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Tue, 13 Jun 2017 15:19:27 -0700 Subject: [PATCH] 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 --- pkg/init/bin/rc.init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/init/bin/rc.init b/pkg/init/bin/rc.init index 308b36d5d..8334a6d75 100755 --- a/pkg/init/bin/rc.init +++ b/pkg/init/bin/rc.init @@ -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