mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-10 23:58:14 +01:00
Don't try to restore ipsets when 'restore' is being used to recover
from a start/restart failure. Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
d362af9fb6
commit
605da92eca
@ -375,7 +375,7 @@ sub generate_script_3($) {
|
||||
' $IPSET -X' ,
|
||||
' $IPSET -R < ${VARDIR}/ipsets.save' ,
|
||||
' fi' ,
|
||||
'elif [ "$COMMAND" = restore ]; then' ,
|
||||
'elif [ "$COMMAND" = restore -a -z "$RECOVERING" ]; then' ,
|
||||
' if [ -f $(my_pathname)-ipsets ]; then' ,
|
||||
' if chain_exists shorewall; then' ,
|
||||
' startup_error "Cannot restore $(my_pathname)-ipsets with Shorewall running"' ,
|
||||
|
@ -2209,6 +2209,9 @@ EOF
|
||||
if [ -x $RESTOREPATH ]; then
|
||||
echo Restoring ${PRODUCT:=Shorewall}...
|
||||
|
||||
RECOVERING=Yes
|
||||
export RECOVERING
|
||||
|
||||
if $RESTOREPATH restore; then
|
||||
echo "$PRODUCT restored from $RESTOREPATH"
|
||||
set_state "Started"
|
||||
|
@ -1593,6 +1593,8 @@ FIREWALL=${VARDIR}/firewall
|
||||
LIBRARIES="$SHAREDIR/lib.base $SHAREDIR/lib.cli"
|
||||
VERSION_FILE=$SHAREDIR/version
|
||||
REFRESHCHAINS=
|
||||
RECOVERING=
|
||||
export RECOVERING
|
||||
|
||||
for library in $LIBRARIES; do
|
||||
if [ -f $library ]; then
|
||||
|
@ -1494,7 +1494,8 @@ fi
|
||||
FIREWALL=${VARDIR}/firewall
|
||||
LIBRARIES="$SHAREDIR/lib.base $SHAREDIR/lib.cli"
|
||||
VERSION_FILE=$SHAREDIR/version
|
||||
REFRESHCHAINS=
|
||||
RRECOVERING=
|
||||
export RECOVERING
|
||||
|
||||
for library in $LIBRARIES; do
|
||||
if [ -f $library ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user