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 -X' ,
|
||||||
' $IPSET -R < ${VARDIR}/ipsets.save' ,
|
' $IPSET -R < ${VARDIR}/ipsets.save' ,
|
||||||
' fi' ,
|
' fi' ,
|
||||||
'elif [ "$COMMAND" = restore ]; then' ,
|
'elif [ "$COMMAND" = restore -a -z "$RECOVERING" ]; then' ,
|
||||||
' if [ -f $(my_pathname)-ipsets ]; then' ,
|
' if [ -f $(my_pathname)-ipsets ]; then' ,
|
||||||
' if chain_exists shorewall; then' ,
|
' if chain_exists shorewall; then' ,
|
||||||
' startup_error "Cannot restore $(my_pathname)-ipsets with Shorewall running"' ,
|
' startup_error "Cannot restore $(my_pathname)-ipsets with Shorewall running"' ,
|
||||||
|
@ -2208,6 +2208,9 @@ EOF
|
|||||||
|
|
||||||
if [ -x $RESTOREPATH ]; then
|
if [ -x $RESTOREPATH ]; then
|
||||||
echo Restoring ${PRODUCT:=Shorewall}...
|
echo Restoring ${PRODUCT:=Shorewall}...
|
||||||
|
|
||||||
|
RECOVERING=Yes
|
||||||
|
export RECOVERING
|
||||||
|
|
||||||
if $RESTOREPATH restore; then
|
if $RESTOREPATH restore; then
|
||||||
echo "$PRODUCT restored from $RESTOREPATH"
|
echo "$PRODUCT restored from $RESTOREPATH"
|
||||||
|
@ -1593,6 +1593,8 @@ FIREWALL=${VARDIR}/firewall
|
|||||||
LIBRARIES="$SHAREDIR/lib.base $SHAREDIR/lib.cli"
|
LIBRARIES="$SHAREDIR/lib.base $SHAREDIR/lib.cli"
|
||||||
VERSION_FILE=$SHAREDIR/version
|
VERSION_FILE=$SHAREDIR/version
|
||||||
REFRESHCHAINS=
|
REFRESHCHAINS=
|
||||||
|
RECOVERING=
|
||||||
|
export RECOVERING
|
||||||
|
|
||||||
for library in $LIBRARIES; do
|
for library in $LIBRARIES; do
|
||||||
if [ -f $library ]; then
|
if [ -f $library ]; then
|
||||||
|
@ -1494,7 +1494,8 @@ fi
|
|||||||
FIREWALL=${VARDIR}/firewall
|
FIREWALL=${VARDIR}/firewall
|
||||||
LIBRARIES="$SHAREDIR/lib.base $SHAREDIR/lib.cli"
|
LIBRARIES="$SHAREDIR/lib.base $SHAREDIR/lib.cli"
|
||||||
VERSION_FILE=$SHAREDIR/version
|
VERSION_FILE=$SHAREDIR/version
|
||||||
REFRESHCHAINS=
|
RRECOVERING=
|
||||||
|
export RECOVERING
|
||||||
|
|
||||||
for library in $LIBRARIES; do
|
for library in $LIBRARIES; do
|
||||||
if [ -f $library ]; then
|
if [ -f $library ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user