summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Erculiani2011-01-07 03:35:25 (GMT)
committerSebastian Pipping2011-01-07 03:35:25 (GMT)
commit5f136adc14e52f729a6d06ef7cb660d33d5038c9 (patch)
tree0f500f0fabb8199cd58af04a653487333bc12516
parent532dd7a3871e389351d115fb19db73532bb6dd5b (diff)
No longer have directory /sys/bus/usb/drivers/usb-storage/module set FORCE_slowusb
-rwxr-xr-xdefaults/initrd.scripts10
1 files changed, 8 insertions, 2 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 2b6834e..f9e7927 100755
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -411,10 +411,16 @@ setup_hotplug() {
}
check_slowusb() {
+ local usb_storage_dir="/sys/bus/usb/drivers/usb-storage"
+ if [ ! -d "${usb_storage_dir}" ]
+ then
+ return
+ fi
[ "${DO_slowusb}" ] || \
- for dir in /sys/bus/usb/drivers/usb-storage/*
+ for x in "${usb_storage_dir}"/*
do
- [ -d "${dir}" ] && FORCE_slowusb="1"
+ [ -d "${x}" ] && [ "${x}" != "${usb_storage_dir}/module" ] \
+ && FORCE_slowusb="1"
done
}