2 USBKBD_RCSID='$Revision$ $Date:: $'
4 # geninitrd mod: usbkbd
6 find_modules_usbkbd() {
7 debug "Finding USB keyboard modules"
9 if [ "$(echo /sys/class/input/input*)" = "/sys/class/input/input*" ]; then
13 local modules i module bInterfaceClass bInterfaceProtocol
15 for i in /sys/class/input/input*; do
16 # standard usb keyboards
17 if [ -f $i/device/bInterfaceClass -a -f $i/device/bInterfaceProtocol ]; then
18 bInterfaceClass=$(cat $i/device/bInterfaceClass)
19 bInterfaceProtocol=$(cat $i/device/bInterfaceProtocol)
20 if [ "$bInterfaceClass" = "03" -a "$bInterfaceProtocol" = "01" ]; then
21 module=$(readlink $i/device/driver/module)
22 module=$(basename $module)
24 if [ -n "$module" ]; then
25 debug "Found USB Keyboard: $(cat $i/name)"
26 modules="$modules $module"
31 # logitech unifying receiver (unfortunately I know no way to detect keyboard only)
32 if grep -qi "Logitech Unifying Device" $i/name; then
33 module=$(readlink $i/device/driver/module)
34 module=$(basename $module)
36 if [ -n "$module" ]; then
37 debug "Found USB Logitech Unifying Device: $(cat $i/name)"
38 modules="$modules $module"
43 if [ -n "$modules" ]; then
45 for m in $(find_modules_by_class "0c03"); do