Load modules for all devices found on the HID bus.

Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
 scripts/functions | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/functions b/scripts/functions
index 2fc3ab2..a6687c1 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -65,6 +65,12 @@ maybe_break()
                        modprobe ${opts} -a i8042 atkbd ehci-pci ehci-orion \
                                 ehci-hcd ohci-hcd ohci-pci uhci-hcd usbhid 
xhci \
                                 xhci-pci xhci-hcd
+                       sleep 2
+                       for modalias in /sys/bus/hid/devices/*/modalias; do
+                               if [ -f "${modalias}" ]; then
+                                       modprobe ${opts} -b "$(cat ${modalias})"
+                               fi
+                       done
                fi
                panic "Spawning shell within the initramfs"
                ;;

Attachment: signature.asc
Description: Digital signature

Reply via email to