#!/bin/sh
mount -n -o remount,rw /

test -f /etc/sysconfig/hotplug &&  . /etc/sysconfig/hotplug && test "$HOTPLUG_START_USB" = "yes" && {
    test -f /proc/cpuinfo || mount -n -t proc proc /proc 2>/dev/null
    test -d /proc/bus/usb || /sbin/modprobe usbcore >/dev/null 2>&1
    mount -n -t usbfs usbfs /proc/bus/usb >/dev/null 2>&1
    for i in ehci-hcd ohci-hcd uhci-hcd usb-ohci usb-uhci ;do echo -n $i" " ;/sbin/modprobe $i >/dev/null 2>&1 ;done;echo
    sleep 3
    grep ^I: /proc/bus/usb/devices | grep HID && for i in input hid keybdev mousedev;do /sbin/modprobe $i >/dev/null 2>&1 ;done
}
cat /proc/bus/usb/devices >/dev/null 2>&1
exec /bin/sh $*
