diff options
author | Bill Nottingham <notting@redhat.com> | 2001-03-02 00:25:56 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2001-03-02 00:25:56 +0000 |
commit | 4e15d5cd7c2727651aaa28dc78c2df4c58cca712 (patch) | |
tree | 07705b57f406f6c92aa2453704d9544499e96494 /rc.d | |
parent | 0baa5c4c836ca2e07978ed62c2e0bbadabeba102 (diff) | |
download | initscripts-4e15d5cd7c2727651aaa28dc78c2df4c58cca712.tar initscripts-4e15d5cd7c2727651aaa28dc78c2df4c58cca712.tar.gz initscripts-4e15d5cd7c2727651aaa28dc78c2df4c58cca712.tar.bz2 initscripts-4e15d5cd7c2727651aaa28dc78c2df4c58cca712.tar.xz initscripts-4e15d5cd7c2727651aaa28dc78c2df4c58cca712.zip |
insert multiple USB controllers correctly
Diffstat (limited to 'rc.d')
-rwxr-xr-x | rc.d/rc.sysinit | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index b4d52a61..549ef167 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -154,11 +154,13 @@ action $"Setting hostname ${HOSTNAME}: " hostname ${HOSTNAME} # Initialize USB controller and HID devices usb=0 if ! grep -iq "nousb" /proc/cmdline 2>/dev/null && ! grep -q "usb" /proc/devices 2>/dev/null ; then - alias=`/sbin/modprobe -c | egrep -s "^alias[[:space:]]+usb-controller" | awk '{ print $3 }'` - if [ -n "$alias" -a "$alias" != "off" ] ; then + aliases=`/sbin/modprobe -c | egrep -s "^alias[[:space:]]+usb-controller" | awk '{ print $3 }'` + if [ -n "$aliases" -a "$aliases" != "off" ] ; then modprobe usbcore - action $"Mounting USB filesystem: " mount -t usbdevfs usbdevfs /proc/bus/usb - action $"Initializing USB controller ($alias): " modprobe $alias + action $"Mounting USB filesystem: " mount -t usbdevfs usbdevfs /proc/bus/usb\ + for alias in aliases ; do + action $"Initializing USB controller ($alias): " modprobe $alias + fi [ $? -eq 0 ] && usb=1 fi fi |