mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-25 00:53:49 +01:00
Only destroy ipsets that will be restored
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
057a2dec70
commit
086f7a0e6d
@ -9065,10 +9065,14 @@ sub create_load_ipsets() {
|
|||||||
# Requires V5 or later
|
# Requires V5 or later
|
||||||
#
|
#
|
||||||
emit( '' ,
|
emit( '' ,
|
||||||
" for set in \$(\$IPSET save | grep '$select' | cut -d' ' -f2); do" ,
|
' if [ -f ${VARDIR}/ipsets.save ]; then' ,
|
||||||
' $IPSET flush $set' ,
|
' while read ${VARDIR}/ipsets.save verb set; do' ,
|
||||||
' $IPSET destroy $set' ,
|
' if [ $verb = create ]; then' ,
|
||||||
" done" ,
|
' $IPSET flush $set' ,
|
||||||
|
' $IPSET destroy $set' ,
|
||||||
|
' fi' ,
|
||||||
|
' done' ,
|
||||||
|
' fi',
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user