mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-26 17:43:15 +01:00
More logging cleanup
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5114 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
2e9eed3dfe
commit
837f977d6d
@ -188,11 +188,11 @@ start_command() {
|
||||
rc=$?
|
||||
else
|
||||
error_message "${LITEDIR}/firewall is missing or is not executable"
|
||||
logger -p kern.err "ERROR:Shorewall Lite start failed"
|
||||
rc=2
|
||||
fi
|
||||
|
||||
[ -n "$nolock" ] || mutex_off
|
||||
[ $rc -eq 0 ] || logger "ERROR:Shorewall Lite start failed"
|
||||
exit $rc
|
||||
}
|
||||
|
||||
@ -363,11 +363,11 @@ restart_command() {
|
||||
rc=$?
|
||||
else
|
||||
error_message "${LITEDIR}/firewall is missing or is not executable"
|
||||
logger -p kern.err "ERROR:Shorewall Lite restart failed"
|
||||
rc=2
|
||||
fi
|
||||
|
||||
[ -n "$nolock" ] || mutex_off
|
||||
[ $rc -eq 0 ] || logger "ERROR:Shorewall Lite restart failed"
|
||||
return $rc
|
||||
}
|
||||
|
||||
|
@ -4462,13 +4462,13 @@ stop_firewall() {
|
||||
|
||||
case \$COMMAND in
|
||||
start)
|
||||
logger "Shorewall start failed"
|
||||
logger -p kern.err "ERROR:\$PRODUCT start failed"
|
||||
;;
|
||||
restart)
|
||||
logger "Shorewall restart failed"
|
||||
logger -p kern.err "ERROR:\$PRODUCT restart failed"
|
||||
;;
|
||||
restore)
|
||||
logger "Shorewall restore failed"
|
||||
logger -p kern.err "ERROR:\$PRODUCT restore failed"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -4691,7 +4691,7 @@ __EOF__
|
||||
|
||||
set_state "Stopped"
|
||||
|
||||
logger "Shorewall Stopped"
|
||||
logger -p kern.info "\$PRODUCT Stopped"
|
||||
|
||||
case \$COMMAND in
|
||||
stop|clear)
|
||||
@ -4887,7 +4887,7 @@ __EOF__
|
||||
|
||||
set_state "Cleared"
|
||||
|
||||
logger "\$PRODUCT Cleared"
|
||||
logger -p kern.info "\$PRODUCT Cleared"
|
||||
}
|
||||
|
||||
#
|
||||
@ -4908,13 +4908,13 @@ startup_error() # \$* = Error Message
|
||||
echo " ERROR: \$@" >&2
|
||||
case \$COMMAND in
|
||||
start)
|
||||
logger "Shorewall start failed"
|
||||
logger -p kern.err "ERROR:\$PRODUCT start failed"
|
||||
;;
|
||||
restart)
|
||||
logger "Shorewall restart failed"
|
||||
logger -p kern.err "ERROR:\$PRODUCT restart failed"
|
||||
;;
|
||||
restore)
|
||||
logger "Shorewall restore failed"
|
||||
logger -p kern.err "ERROR:\$PRODUCT restore failed"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -5480,13 +5480,13 @@ __EOF__
|
||||
|
||||
case \$COMMAND in
|
||||
start)
|
||||
logger "Shorewall started"
|
||||
logger -p kern.info "\$PRODUCT started"
|
||||
;;
|
||||
restart)
|
||||
logger "Shorewall restarted"
|
||||
logger -p kern.info "\$PRODUCT restarted"
|
||||
;;
|
||||
restore)
|
||||
logger "Shorewall restored"
|
||||
logger -p kern.info "\$PRODUCT restored"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -81,7 +81,7 @@ startup_error() # $* = Error Message
|
||||
#
|
||||
report () { # $* = message
|
||||
progress_message3 "$@"
|
||||
logger "$@"
|
||||
logger -p kern.info "$@"
|
||||
}
|
||||
|
||||
#
|
||||
@ -391,7 +391,7 @@ stop_firewall() {
|
||||
|
||||
set_state "Stopped"
|
||||
|
||||
logger "Shorewall Stopped"
|
||||
logger -p kern.info "Shorewall Stopped"
|
||||
|
||||
rm -rf $TMP_DIR
|
||||
|
||||
@ -434,7 +434,7 @@ clear_firewall() {
|
||||
|
||||
set_state "Cleared"
|
||||
|
||||
logger "Shorewall Cleared"
|
||||
logger -p kern.info "Shorewall Cleared"
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -766,12 +766,7 @@ restore_command() {
|
||||
|
||||
progress_message3 "Restoring Shorewall..."
|
||||
|
||||
if $SHOREWALL_SHELL $RESTOREPATH restore; then
|
||||
progress_message3 "$PRODUCT restored from ${VARDIR}/$RESTOREFILE"
|
||||
logger "$PRODUCT restored"
|
||||
else
|
||||
logger "ERROR:$PRODUCT restore failed"
|
||||
fi
|
||||
$SHOREWALL_SHELL $RESTOREPATH restore && progress_message3 "$PRODUCT restored from ${VARDIR}/$RESTOREFILE"
|
||||
|
||||
[ -n "$nolock" ] || mutex_off
|
||||
else
|
||||
|
@ -233,11 +233,11 @@ start_command() {
|
||||
${VARDIR}/.start $debugging start
|
||||
rc=$?
|
||||
else
|
||||
logger -p kern.err "ERROR:Shorewall start failed"
|
||||
rc=$?
|
||||
fi
|
||||
|
||||
[ -n "$nolock" ] || mutex_off
|
||||
[ $rc -ne 0 ] && logger "ERROR: Shorewall start failed"
|
||||
exit $rc
|
||||
}
|
||||
|
||||
@ -332,7 +332,6 @@ start_command() {
|
||||
$SHOREWALL_SHELL $RESTOREPATH restore
|
||||
date > ${VARDIR}/restarted
|
||||
progress_message3 Shorewall restored from $RESTOREPATH
|
||||
logger "Shorewall restored"
|
||||
else
|
||||
do_it
|
||||
fi
|
||||
@ -551,11 +550,11 @@ restart_command() {
|
||||
$SHOREWALL_SHELL ${VARDIR}/.restart $debugging restart
|
||||
rc=$?
|
||||
else
|
||||
logger -p kern.err "ERROR:Shorewall restart failed"
|
||||
rc=$?
|
||||
fi
|
||||
|
||||
[ -n "$nolock" ] || mutex_off
|
||||
[ $rc -ne 0 ] && logger "ERROR: Shorewall restart failed"
|
||||
return $rc
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user