aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorTrond Eivind Glomsrod <teg@redhat.com>2000-07-18 14:53:54 +0000
committerTrond Eivind Glomsrod <teg@redhat.com>2000-07-18 14:53:54 +0000
commitc075c9238daf51990d09520f320ad7aff518fdd2 (patch)
tree1da3c0e6e8acfbebe2a0936f802c2096caff3502 /rc.d
parent4a0f428dae16461df662365a188402603b194b48 (diff)
downloadinitscripts-c075c9238daf51990d09520f320ad7aff518fdd2.tar
initscripts-c075c9238daf51990d09520f320ad7aff518fdd2.tar.gz
initscripts-c075c9238daf51990d09520f320ad7aff518fdd2.tar.bz2
initscripts-c075c9238daf51990d09520f320ad7aff518fdd2.tar.xz
initscripts-c075c9238daf51990d09520f320ad7aff518fdd2.zip
- add "nousb" command line parameterr5-35
- fix some warnings when mounting /proc/bus/usb
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit42
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