modules: remove the ability to rename modules on the fly

Kmod doesn't support the -o switch, so if you have been using this your
module loads have been failing.
This commit is contained in:
William Hubbs 2018-06-29 15:29:46 -05:00
parent 79648ac1c6
commit a571a42421
2 changed files with 2 additions and 18 deletions

View File

@ -8,11 +8,6 @@
#modules_2="ipv6" #modules_2="ipv6"
#modules="ohci1394" #modules="ohci1394"
# Linux users can give modules a different name when they load - the new name
# will also be used to pick arguments below.
# This is not supported on FreeBSD.
#modules="dummy:dummy1"
# Linux users can give the modules some arguments if needed, per version # Linux users can give the modules some arguments if needed, per version
# if necessary. # if necessary.
# Again, the most specific versioned variable will take precedence. # Again, the most specific versioned variable will take precedence.

View File

@ -103,7 +103,7 @@ Linux_modules()
x=${x%.*} x=${x%.*}
done done
local list= x= xx= y= args= mpargs= a= local list= x= xx= y= args=
for x in $kv_variant_list ; do for x in $kv_variant_list ; do
eval list=\$modules_$(shell_var "$x") eval list=\$modules_$(shell_var "$x")
[ -n "$list" ] && break [ -n "$list" ] && break
@ -112,24 +112,13 @@ Linux_modules()
[ -n "$list" ] && ebegin "Loading kernel modules" [ -n "$list" ] && ebegin "Loading kernel modules"
for x in $list; do for x in $list; do
a=${x#*:}
if [ "$a" = "$x" ]; then
unset mpargs
else
x=${x%%:*}
mpargs="-o $a"
fi
aa=$(shell_var "$a")
xx=$(shell_var "$x") xx=$(shell_var "$x")
for y in $kv_variant_list ; do for y in $kv_variant_list ; do
eval args=\$module_${aa}_args_$(shell_var "$y")
[ -n "${args}" ] && break
eval args=\$module_${xx}_args_$(shell_var "$y") eval args=\$module_${xx}_args_$(shell_var "$y")
[ -n "${args}" ] && break [ -n "${args}" ] && break
done done
[ -z "$args" ] && eval args=\$module_${aa}_args
[ -z "$args" ] && eval args=\$module_${xx}_args [ -z "$args" ] && eval args=\$module_${xx}_args
eval modprobe --use-blacklist --verbose "$mpargs" "$x" "$args" eval modprobe --use-blacklist --verbose "$x" "$args"
done done
[ -n "$list" ] && eend [ -n "$list" ] && eend
} }