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 # Distributed under the GPL v2
# $Id$ # $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: 16 Mar 2011; Sebastian Pipping <sping@gentoo.org> genkernel:
Bump version to 3.4.14 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 # Only sections that are in by default or those that
# are not module groups need to be defined here... # 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' 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() { setup_slowusb() {
# slowusb already set? # This function removes unset DO_slowusb if there is no usb-storage attached.
if [ "${DO_slowusb}" = "1" ] # If noslowusb is set, skip this function
then [ "${DO_slowusb}" ] || return
return
fi # 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" local usb_storage_dir="/sys/bus/usb/drivers/usb-storage"
if [ ! -d "${usb_storage_dir}" ] if [ ! -d "${usb_storage_dir}" ]

Loading…
Cancel
Save