Eliminate MODULE_SUFFIX

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2017-08-23 10:19:25 -07:00
parent 6053a40af0
commit 6f475cde3f
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -280,18 +280,15 @@ loadmodule() # $1 = module name, $2 - * arguments
if [ ! -d /sys/module/$modulename ]; then
case $moduleloader in
insmod)
for suffix in $MODULE_SUFFIX ; do
for directory in $moduledirectories; do
modulefile=$directory/${modulename}.${suffix}
if [ -f $modulefile ]; then
insmod $modulefile $moduleoptions
break 2
fi
for directory in $moduledirectories; do
for modulefile in $directory/${modulename}.*; do
insmod $modulefile $moduleoptions
return
done
done
;;
*)
modprobe $modulename $moduleoptions
modprobe $modulename $moduleoptions 2> /dev/null
;;
esac
fi
@ -299,18 +296,15 @@ loadmodule() # $1 = module name, $2 - * arguments
elif ! list_search $modulename $DONT_LOAD $MODULES; then
case $moduleloader in
insmod)
for suffix in $MODULE_SUFFIX ; do
for directory in $moduledirectories; do
modulefile=$directory/${modulename}.${suffix}
if [ -f $modulefile ]; then
insmod $modulefile $moduleoptions
break 2
fi
for directory in $moduledirectories; do
for modulefile in $directory/${modulename}.*; do
insmod $modulefile $moduleoptions
return
done
done
;;
*)
modprobe $modulename $moduleoptions
modprobe $modulename $moduleoptions 2> /dev/null
;;
esac
fi