mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-11 08:08:12 +01:00
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:
parent
1447b53d84
commit
3a1191f1df
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user