diff options
Diffstat (limited to 'rc.d')
-rwxr-xr-x | rc.d/rc.sysinit | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index d61862ef..d249db77 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -146,25 +146,29 @@ 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` - uhci=`grep -A2 -i usb /proc/pci |grep "I/O at"` - - # Don't try to initialize disabled USB controllers - uhciirq=`grep -A1 -i usb /proc/pci |grep "IRQ"` - if [ -n "$usbpresent" ]; then - usb=1 - if [ -n "$uhci" ] && [ -n "$uhciirq" ] ; then - modprobe uhci 2>/dev/null || usb=0 - else - modprobe usb-ohci 2>/dev/null || usb=0 +if [ grep -q "nousb" /proc/cmdline 2>/dev/null ]; then + usb=0 +else + usb=1 + modprobe usb-controller 2>/dev/null || usb=0 + if [ $usb = "0" ] ; then + usbpresent=`grep -i usb /proc/pci` + uhci=`grep -A2 -i usb /proc/pci |grep "I/O at"` + + # Don't try to initialize disabled USB controllers + uhciirq=`grep -A1 -i usb /proc/pci |grep "IRQ"` + if [ -n "$usbpresent" ]; then + usb=1 + if [ -n "$uhci" ] && [ -n "$uhciirq" ] ; then + modprobe uhci 2>/dev/null || usb=0 + else + modprobe usb-ohci 2>/dev/null || usb=0 + fi fi - fi -fi -if [ $usb = "1" ]; then - action "Initializing USB controller: " /bin/true + fi + if [ $usb = "1" ]; then + action "Initializing USB controller: " /bin/true + fi fi if [ $usb = "1" ]; then @@ -272,7 +276,7 @@ rm -f /etc/mtab~ /etc/mtab~~ # Enter root and /proc and /proc/bus/usb into mtab. mount -f / mount -f /proc -[ -f /proc/bus/usb/devices ] && mount -f /proc/bus/usb +[ -f /proc/bus/usb/devices ] && mount -f -t usbdevfs usbdevfs /proc/bus/usb # Turn on harddisk optimization if [ -f /etc/sysconfig/harddisks ] && [ -x /sbin/hdparm ]; then |