aboutsummaryrefslogtreecommitdiff
path: root/hwdetect
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-11-29 01:26:11 +0000
committerJudd Vinet <judd@archlinux.org>2005-11-29 01:26:11 +0000
commit78365fe57d61645c1b8282784d863a0cd8537eb5 (patch)
treeca14ac45463e6c1d8ac92b550dfb79ad9c4d98dd /hwdetect
parent0d7cb77c48fc6232a8342fba9056a1896898b066 (diff)
downloadinitscripts-78365fe57d61645c1b8282784d863a0cd8537eb5.tar.xz
finished crypttab work, fixed a bug in hwdetect related to custom kernels
Diffstat (limited to 'hwdetect')
-rwxr-xr-xhwdetect19
1 files changed, 12 insertions, 7 deletions
diff --git a/hwdetect b/hwdetect
index 5109a0a..d99813a 100755
--- a/hwdetect
+++ b/hwdetect
@@ -76,9 +76,10 @@ fi
# find PNP devices like parports, soundcards etc.
# (workaround for rtc, pcspkr, irtty-sir and analog are included)
-if [ "`find /sys -name 'id' | grep pnp`" ]; then
- for i in `find /sys -name "id" | grep pnp`; do
+if [ "`find /sys/devices -name 'id' | grep /pnp`" ]; then
+ for i in `find /sys/devices -name "id" | grep /pnp`; do
devid=`cat $i | grep PNP`
+ [ "$devid" ] || continue
modprobe -i --show-depends pnp:d${devid} >> /tmp/modules-plain 2>/dev/null
@@ -123,7 +124,8 @@ fi
# Modem devices
case $i in (Intel536|Intel537|ltmodem|ltserial|slarm|slusb) \
-grep "$i" /tmp/modules-plain && modprobe -i --show-depends ppp-generic >> /tmp/modules-plain 2>/dev/null ;; esac
+ grep "$i" /tmp/modules-plain && modprobe -i --show-depends ppp-generic >> /tmp/modules-plain 2>/dev/null ;; \
+ esac
# Parport modules
if [ "`grep 'parport' /tmp/modules-plain`" ]; then
@@ -147,9 +149,11 @@ if [ "`grep 'usb/' /tmp/modules-plain`" ]; then
fi
sort -u /tmp/modules-plain >> /tmp/modules-stripped
-# OTHER modules loading first for speedup!
-grep -v "ide/" /tmp/modules-stripped | grep -v "scsi/" | grep -v "ata" | grep -v "net/" | grep -v "pcmcia/" \
-| grep -v "usb/" | grep -v "ieee1394/" >> /tmp/modules-sorted
+# OTHER modules loading first for speed up!
+grep -v "ide/" /tmp/modules-stripped | grep -v "scsi/" | grep -v "ata" | \
+ grep -v "net/" | grep -v "pcmcia/" | grep -v "usb/" | \
+ grep -v "ieee1394/" >> /tmp/modules-sorted
+
# make a correct order for the modules, internal devices have priority!
grep "ide/" /tmp/modules-stripped >> /tmp/modules-sorted
grep "scsi/" /tmp/modules-stripped | grep -v "sata" | grep -v "libata" | grep -v "ata_piix" >> /tmp/modules-sorted
@@ -157,7 +161,8 @@ grep "ata" /tmp/modules-stripped | grep -v "eata" >> /tmp/modules-sorted
grep "net/" /tmp/modules-stripped | grep -v "wireless/" | grep -v "usb/" >> /tmp/modules-sorted
grep "wireless/" /tmp/modules-stripped >> /tmp/modules-sorted
grep "pcmcia/" /tmp/modules-stripped >> /tmp/modules-sorted
-# speedup usb module loading
+
+# speed up usb module loading
grep "usb-storage" /tmp/modules-stripped >> /tmp/modules-sorted
grep "usblp" /tmp/modules-stripped >> /tmp/modules-sorted
grep "usbhid" /tmp/modules-stripped >> /tmp/modules-sorted