diff --git a/Shorewall/lib.base b/Shorewall/lib.base index 9435f3912..61e6ba69d 100644 --- a/Shorewall/lib.base +++ b/Shorewall/lib.base @@ -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