diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2016-01-21 22:40:29 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-01-21 22:40:29 +0000 |
commit | c450285cb6e94253db06d78cfa8c88a5d214f7a1 (patch) | |
tree | 4c55c5094189d660569f16cedfec4d363fd55758 /scripts | |
parent | 544677370739526602b5be8a73eabeb286815db3 (diff) | |
parent | 8c437f50735da85745c47f90460dfac4e2d6e804 (diff) |
Merge branch 'benh/keyboard-fixes'
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/functions | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/scripts/functions b/scripts/functions index 990fe6c..531d1bd 100644 --- a/scripts/functions +++ b/scripts/functions @@ -45,14 +45,6 @@ panic() reboot exit # in case reboot fails, force kernel panic fi - modprobe -v i8042 || true - modprobe -v atkbd || true - modprobe -v ehci-pci || true - modprobe -v ehci-orion || true - modprobe -v ehci-hcd || true - modprobe -v uhci-hcd || true - modprobe -v ohci-hcd || true - modprobe -v usbhid || true run_scripts /scripts/panic @@ -63,6 +55,23 @@ maybe_break() { case ",$break," in *,$1,*) + if [ "$1" = "top" ]; then + # udev is not yet running, so load keyboard drivers + if [ "${quiet}" = "y" ]; then + opts="-q" + else + opts="-v" + fi + 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" ;; esac |