Add nodetect and doload patch from bug #102643, with some modifications.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@311 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Chris Gianelloni 20 years ago
parent 3e065b5f52
commit 2a69de95aa

@ -26,6 +26,15 @@ parse_opt() {
esac esac
} }
modules_load() {
for module in $*
do
echo ${module} >> /etc/modules/extra_load
done
modules_scan extra_load
}
modules_scan() { modules_scan() {
local MODS local MODS
[ -d /etc/modules/${1} ] || touch /etc/modules/${1} [ -d /etc/modules/${1} ] || touch /etc/modules/${1}

@ -139,12 +139,12 @@ do
doevms2) doevms2)
USE_EVMS2_NORMAL=1 USE_EVMS2_NORMAL=1
;; ;;
# Start Debug Option # Debug Options
debug) debug)
DEBUG='yes' DEBUG='yes'
;; ;;
# Scandelay options # Scan delay options
scandelay\=*) scandelay\=*)
SDELAY=`parse_opt "${x}"` SDELAY=`parse_opt "${x}"`
;; ;;
@ -153,9 +153,16 @@ do
;; ;;
# Module no-loads # Module no-loads
doload\=*)
MDOLIST=`parse_opt "${x}"`
MDOLIST="`echo ${MDOLIST} | sed -e \"s/,/ /g\"`"
;;
nodetect)
NODETECT=1
;;
noload\=*) noload\=*)
MLIST=`parse_opt "${x}"` MLIST=`parse_opt "${x}"`
MLIST="`echo ${MLIST} | sed -e \"s/,/ /\"`" MLIST="`echo ${MLIST} | sed -e \"s/,/ /g\"`"
export MLIST export MLIST
;; ;;
@ -190,16 +197,21 @@ detect_sbp2_devices
cmdline_hwopts cmdline_hwopts
# Load modules listed in MY_HWOPTS if /lib/modules exists # Load modules listed in MY_HWOPTS if /lib/modules exists
if [ -d '/lib/modules' ] if [ -d '/lib/modules' ]
then then
good_msg 'Loading modules' good_msg 'Loading modules'
# Load appropriate kernel modules # Load appropriate kernel modules
for modules in $MY_HWOPTS if [ "${NODETECT}" -ne '1' ]
do then
modules_scan $modules for modules in $MY_HWOPTS
eval DO_`echo $modules | sed 's/-//'`=1 do
done modules_scan $modules
eval DO_`echo $modules | sed 's/-//'`=1
done
fi
# Always eval doload=...
modules_load $MDOLIST
else else
for modules in $MY_HWOPTS for modules in $MY_HWOPTS
do do

Loading…
Cancel
Save