diff options
author | Trond Eivind Glomsrod <teg@redhat.com> | 2000-06-29 16:22:34 +0000 |
---|---|---|
committer | Trond Eivind Glomsrod <teg@redhat.com> | 2000-06-29 16:22:34 +0000 |
commit | fcfd078dd0ff839761250a299d05574cf479120c (patch) | |
tree | b4aecb526ec89f017a8ef84ddd8048b0115f2e1c /rc.d | |
parent | f4f321f1741a232657d67dc33fee34fd14fce90f (diff) | |
download | initscripts-fcfd078dd0ff839761250a299d05574cf479120c.tar initscripts-fcfd078dd0ff839761250a299d05574cf479120c.tar.gz initscripts-fcfd078dd0ff839761250a299d05574cf479120c.tar.bz2 initscripts-fcfd078dd0ff839761250a299d05574cf479120c.tar.xz initscripts-fcfd078dd0ff839761250a299d05574cf479120c.zip |
Added USB initializing, including drivers for mouse and keyboards (if needeed)
Diffstat (limited to 'rc.d')
-rwxr-xr-x | rc.d/rc.sysinit | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index a6093c70..375e5fe5 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -258,6 +258,43 @@ if [ -f /etc/sysconfig/harddisks ] && [ -x /sbin/hdparm ]; then fi fi +# Initialize USB controller and HID devices + +usb=1 +modprobe usb-controller 2>/dev/null || usb=0 +if [ $usb == "0" ] ; then + usbpresent=`grep -i usb /proc/pci` + ioinfo=`grep -A2 -i usb /proc/pci |tail -n 1` + uhci=`echo $ioinfo |grep "I/O at"` + if [ -n "$usbpresent" ]; then + usb=1 + if [ -n "$uhci" ]; then + modprobe uhci 2>/dev/null || usb=0 + else + modprobe usb-ohci 2>/dev/null || usb=0 + usbcontroller="usb-ohci" + fi + fi +fi +if [ $usb == "1" ]; then + action "Initializing USB controller: " /bin/true +fi + +if [ $usb == "1" ]; then + sleep 5 + action "Mount USB filesystem" mount -t usbdevfs usbdevfs /proc/bus/usb + mouseoutput=`cat /proc/bus/usb/devices|grep -E "^I.*Cls=03.*Prot=02"` + kbdoutput=`cat /proc/bus/usb/devices|grep -E "^I.*Cls=03.*Prot=01"` + if [ -n "$kbdoutput" ] || [ -n "$mouseoutput" ]; then + action "Initializing USB HID interface" modprobe hid 2> /dev/null + fi + if [ -n "$kbdoutput" ]; then + action "Initializing USB keyboard:" modprobe keybdev + fi + if [ -n "$mouseoutput" ]; then + action "Initializing USB mouse" modprobe mousedev + fi +fi # Update quotas if fsck was run on /. if [ X"$_RUN_QUOTACHECK" = X1 -a -x /sbin/quotacheck ]; then |