Continue to refine missing $VARDIR workaround

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5303 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-01-25 23:23:57 +00:00
parent c7b31882a0
commit 7c823c1409

View File

@ -249,6 +249,7 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
local directory
local moduledirectories=
local moduleloader=modprobe
local savemoduleinfo=${1:-Yes} # So old compiled scripts still work
if ! qt mywhich modprobe; then
moduleloader=insmod
@ -267,12 +268,12 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
MODULES=$(lsmod | cut -d ' ' -f1)
progress_message "Loading Modules..."
. $modules
if [ "$1" = Yes ]; then
if [ $savemoduleinfo = Yes ]; then
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir
cp -f $modules ${VARDIR}/.modules
fi
elif [ "$1" = Yes ]; then
elif [ $savemoduleinfo = Yes ]; then
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
> ${VARDIR}/.modulesdir
> ${VARDIR}/.modules