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