Fix handling of doslowusb/noslowusb

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.
cleanup-cruft
Peter Hjalmarsson 14 years ago
parent 16a7793dda
commit 5a33ee4b48

@ -5,6 +5,13 @@
# 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

@ -80,4 +80,4 @@ DEFAULT_NFSOPTIONS="ro,nolock,rsize=1024,wsize=1024"
# 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'

@ -419,11 +419,12 @@ setup_hotplug() {
}
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}" ]

Loading…
Cancel
Save