Fix IPSETS_SAVE=Yes problem with 'save'

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4879 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-11-15 04:16:59 +00:00
parent 1447b53d84
commit 3a1191f1df
2 changed files with 9 additions and 3 deletions

View File

@ -267,6 +267,11 @@ load_kernel_modules()
MODULES=$(lsmod | cut -d ' ' -f1)
progress_message "Loading Modules..."
. $modules
echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir
cp -f $modules ${VARDIR}/.modules
else
> ${VARDIR}/.modulesdir
> ${VARDIR}/.modules
fi
MODULESDIR=$save_modules_dir

View File

@ -265,7 +265,7 @@ save_config() {
echo " ERROR: $RESTOREPATH exists and is not a saved $PRODUCT configuration"
else
case $RESTOREFILE in
save|restore-base)
save)
echo " ERROR: Reserved file name: $RESTOREFILE"
;;
*)
@ -291,9 +291,10 @@ save_config() {
echo >> $f
echo ". ${SHAREDIR}/lib.base" >> $f
echo >> $f
grep '^MODULE' ${VARDIR}/restore-base >> $f
cat ${VARDIR}/.modulesdir >> $f
echo >> $f
echo "reload_kernel_modules << __EOF__" >> $f
grep 'loadmodule ip_set' ${VARDIR}/restore-base >> $f
grep 'loadmodule ip_set' ${VARDIR}/.modules >> $f
echo "__EOF__" >> $f
echo >> $f
echo "ipset -U :all: :all:" >> $f