mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-21 23:23:13 +01:00
Apply Tuomo Soini's loadmodule patch
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
3d322d31b7
commit
6053a40af0
@ -269,53 +269,50 @@ loadmodule() # $1 = module name, $2 - * arguments
|
||||
{
|
||||
local modulename
|
||||
modulename=$1
|
||||
shift
|
||||
local moduleoptions
|
||||
moduleoptions=$*
|
||||
local modulefile
|
||||
local suffix
|
||||
|
||||
if [ -d /sys/module/ ]; then
|
||||
if ! list_search $modulename $DONT_LOAD; then
|
||||
if [ ! -f /sys/module/$modulename ]; then
|
||||
shift
|
||||
|
||||
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
|
||||
done
|
||||
done
|
||||
;;
|
||||
*)
|
||||
modprobe $modulename $moduleoptions
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
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}
|
||||
|
||||
for directory in $moduledirectories; do
|
||||
modulefile=$directory/${modulename}.${suffix}
|
||||
if [ -f $modulefile ]; then
|
||||
case $moduleloader in
|
||||
insmod)
|
||||
insmod $modulefile $*
|
||||
;;
|
||||
*)
|
||||
modprobe $modulename $*
|
||||
;;
|
||||
esac
|
||||
insmod $modulefile $moduleoptions
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
fi
|
||||
elif ! list_search $modulename $DONT_LOAD $MODULES; then
|
||||
shift
|
||||
|
||||
for suffix in $MODULE_SUFFIX ; do
|
||||
for directory in $moduledirectories; do
|
||||
modulefile=$directory/${modulename}.${suffix}
|
||||
|
||||
if [ -f $modulefile ]; then
|
||||
case $moduleloader in
|
||||
insmod)
|
||||
insmod $modulefile $*
|
||||
;;
|
||||
*)
|
||||
modprobe $modulename $*
|
||||
;;
|
||||
esac
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
;;
|
||||
*)
|
||||
modprobe $modulename $moduleoptions
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user