diff --git a/initrd/etc/functions.sh b/initrd/etc/functions.sh index 66e9bb9b6..eb20375ca 100644 --- a/initrd/etc/functions.sh +++ b/initrd/etc/functions.sh @@ -1151,12 +1151,12 @@ enable_usb_keyboard() { # For resiliency, test CONFIG_USB_KEYBOARD_REQUIRED explicitly rather # than having it imply CONFIG_USER_USB_KEYBOARD at build time. # Otherwise, if a user got CONFIG_USER_USB_KEYBOARD=n in their - # config.user by mistake (say, by copying config.user from a laptop to a - # desktop/server), they could lock themselves out, only recoverable by - # hardware flash. + # config.user by mistake, they could lock themselves out. if [ "$CONFIG_USB_KEYBOARD_REQUIRED" = y ] || [ "$CONFIG_USER_USB_KEYBOARD" = y ]; then - insmod.sh /lib/modules/usbhid.ko || DIE "usbhid: module load failed" - fi + enable_usb + wait_for_usb_devices + insmod.sh /lib/modules/usbhid.ko || DIE "usbhid: module load failed" +fi } # ------- End of functions coming from /etc/ash_functions diff --git a/initrd/init b/initrd/init index 73bfde2f8..8ac4d4fc5 100755 --- a/initrd/init +++ b/initrd/init @@ -188,7 +188,7 @@ fi # load USB modules for boards using a USB keyboard if [ "$CONFIG_USB_KEYBOARD_REQUIRED" = y ] || [ "$CONFIG_USER_USB_KEYBOARD" = "y" ]; then - enable_usb + enable_usb_keyboard fi # Set the keyboard keymap if defined, file exists, and loadkeys is available