From c075c9238daf51990d09520f320ad7aff518fdd2 Mon Sep 17 00:00:00 2001 From: Trond Eivind Glomsrod Date: Tue, 18 Jul 2000 14:53:54 +0000 Subject: - add "nousb" command line parameter - fix some warnings when mounting /proc/bus/usb --- rc.d/rc.sysinit | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'rc.d/rc.sysinit') 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 -- cgit v1.2.1