forked from extern/shorewall_code
Better fix for missing $VARDIR
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5301 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
a29f012303
commit
45bbd5413d
@ -59,6 +59,6 @@ VERSION=$(cat /usr/share/shorewall-lite/version)
|
||||
[ -n "$IPTABLES" ] || IPTABLES=$(mywhich iptables)
|
||||
|
||||
VERBOSE=0
|
||||
load_kernel_modules
|
||||
load_kernel_modules No
|
||||
determine_capabilities
|
||||
report_capabilities1
|
||||
|
@ -5180,10 +5180,10 @@ __EOF__
|
||||
save_command_unindented EOF
|
||||
save_command "reload_kernel_modules < \${VARDIR}/.modules"
|
||||
else
|
||||
save_command load_kernel_modules
|
||||
save_command load_kernel_modules Yes
|
||||
fi
|
||||
else
|
||||
save_command load_kernel_modules
|
||||
save_command load_kernel_modules Yes
|
||||
fi
|
||||
|
||||
for interface in $ALL_INTERFACES; do
|
||||
|
@ -243,7 +243,7 @@ reload_kernel_modules() {
|
||||
#
|
||||
# Load kernel modules required for Shorewall
|
||||
#
|
||||
load_kernel_modules()
|
||||
load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
|
||||
{
|
||||
local save_modules_dir=$MODULESDIR
|
||||
local directory
|
||||
@ -267,10 +267,13 @@ load_kernel_modules()
|
||||
MODULES=$(lsmod | cut -d ' ' -f1)
|
||||
progress_message "Loading Modules..."
|
||||
. $modules
|
||||
if [ "$1" = Yes ]; then
|
||||
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
|
||||
echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir
|
||||
cp -f $modules ${VARDIR}/.modules
|
||||
fi
|
||||
elif [ "$1" = Yes ]; then
|
||||
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
|
||||
echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir
|
||||
cp -f $modules ${VARDIR}/.modules
|
||||
else
|
||||
> ${VARDIR}/.modulesdir
|
||||
> ${VARDIR}/.modules
|
||||
fi
|
||||
|
@ -1902,7 +1902,7 @@ do_initialize() {
|
||||
|
||||
if [ -z "$EXPORT" -a "$(whoami)" = root ]; then
|
||||
|
||||
load_kernel_modules
|
||||
load_kernel_modules Yes
|
||||
|
||||
if [ -z "$IPTABLES" ]; then
|
||||
IPTABLES=$(mywhich iptables 2> /dev/null)
|
||||
|
Loading…
Reference in New Issue
Block a user