Set DO_slowusb as default, and make setup_slowusb unset it if it cannot find
a usb-storage attached. This makes genkernel ramdisk adhere to "noslowusb",
makes the ramdisk only wait if there is a usb-storage attached and should fix
gentoo bug #359619.
# Distributed under the GPL v2
# $Id$
+ 22 Mar 2011; Peter Hjalmarsson <xake@rymdraket.net> defaults/initrd.defaults,
+ defaults/initrd.scripts:
+ Set DO_slowusb as default, and make setup_slowusb unset it if it cannot find
+ a usb-storage attached. This makes genkernel ramdisk adhere to "noslowusb",
+ makes the ramdisk only wait if there is a usb-storage attached and should fix
+ gentoo bug #359619.
+
16 Mar 2011; Sebastian Pipping <sping@gentoo.org> genkernel:
Bump version to 3.4.14
# Only sections that are in by default or those that
# are not module groups need to be defined here...
HWOPTS='keymap cache modules pata sata scsi usb firewire waitscan slowusb evms lvm dmraid mdadm fs net'
-MY_HWOPTS='modules pata sata scsi usb firewire waitscan dmraid mdadm fs net iscsi'
+MY_HWOPTS='modules pata sata scsi slowusb usb firewire waitscan dmraid mdadm fs net iscsi'
}
setup_slowusb() {
- # slowusb already set?
- if [ "${DO_slowusb}" = "1" ]
- then
- return
- fi
+ # This function removes unset DO_slowusb if there is no usb-storage attached.
+ # If noslowusb is set, skip this function
+ [ "${DO_slowusb}" ] || return
+
+ # Unset DO_slowusb, so we can set it again if usb-storage has something attached
+ unset DO_slowusb
local usb_storage_dir="/sys/bus/usb/drivers/usb-storage"
if [ ! -d "${usb_storage_dir}" ]