forked from extern/shorewall_code
More error logging
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5107 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
109cdc0902
commit
626e0c577f
@ -48,7 +48,7 @@ fatal_error() # $* = Error Message
|
||||
}
|
||||
|
||||
#
|
||||
# We include this for compatibility with the 'firewall' script. It distinguishes between
|
||||
# We include this for compatibility with the 'firewall' script. That script distinguishes between
|
||||
# Fatal Errors (stop or restore required) and Startup Errors (errors detected before the firewall
|
||||
# state has been changed. This allows us to use common parsing routines in both programs.
|
||||
#
|
||||
|
@ -765,7 +765,14 @@ restore_command() {
|
||||
fi
|
||||
|
||||
progress_message3 "Restoring Shorewall..."
|
||||
$SHOREWALL_SHELL $RESTOREPATH restore && progress_message3 "$PRODUCT restored from ${VARDIR}/$RESTOREFILE"
|
||||
|
||||
if $SHOREWALL_SHELL $RESTOREPATH restore; then
|
||||
progress_message3 "$PRODUCT restored from ${VARDIR}/$RESTOREFILE"
|
||||
logger "$PRODUCT restored"
|
||||
else
|
||||
logger "ERROR:$PRODUCT restore failed"
|
||||
fi
|
||||
|
||||
[ -n "$nolock" ] || mutex_off
|
||||
else
|
||||
echo "File ${VARDIR}/$RESTOREFILE: file not found"
|
||||
|
@ -237,6 +237,7 @@ start_command() {
|
||||
fi
|
||||
|
||||
[ -n "$nolock" ] || mutex_off
|
||||
[ $rc -ne 0 ] && logger "ERROR: Shorewall start failed"
|
||||
exit $rc
|
||||
}
|
||||
|
||||
@ -331,6 +332,7 @@ start_command() {
|
||||
$SHOREWALL_SHELL $RESTOREPATH restore
|
||||
date > ${VARDIR}/restarted
|
||||
progress_message3 Shorewall restored from $RESTOREPATH
|
||||
logger "Shorewall restored"
|
||||
else
|
||||
do_it
|
||||
fi
|
||||
@ -553,6 +555,7 @@ restart_command() {
|
||||
fi
|
||||
|
||||
[ -n "$nolock" ] || mutex_off
|
||||
[ $rc -ne 0 ] && logger "ERROR: Shorewall restart failed"
|
||||
return $rc
|
||||
}
|
||||
|
||||
@ -1502,7 +1505,7 @@ case "$COMMAND" in
|
||||
;;
|
||||
restore)
|
||||
shift
|
||||
restore_command $@
|
||||
r estore_command $@
|
||||
;;
|
||||
call)
|
||||
[ -n "$debugging" ] && set -x
|
||||
|
Loading…
Reference in New Issue
Block a user