From ee92294804a38893c25d6ca9102d5284ffa06f39 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 17 May 2010 07:02:30 -0700 Subject: [PATCH] Log the text from startup errors. Signed-off-by: Tom Eastep --- Shorewall/Perl/prog.header | 8 +++++++- Shorewall/Perl/prog.header6 | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/prog.header b/Shorewall/Perl/prog.header index 581114b1e..58b5d36b5 100644 --- a/Shorewall/Perl/prog.header +++ b/Shorewall/Perl/prog.header @@ -656,7 +656,7 @@ fatal_error() { echo " ERROR: $@" >&2 - if [ $LOG_VERBOSITY -gt 1 ]; then + if [ $LOG_VERBOSITY -ge 0 ]; then timestamp="$(date +'%_b %d %T') " echo "${timestamp} ERROR: $@" >> $STARTUP_LOG fi @@ -672,6 +672,12 @@ fatal_error() startup_error() # $* = Error Message { echo " ERROR: $@: Firewall state not changed" >&2 + + if [ $LOG_VERBOSITY -ge 0 ]; then + timestamp="$(date +'%_b %d %T') " + echo "${timestamp} ERROR: $@" >> $STARTUP_LOG + fi + case $COMMAND in start) logger -p kern.err "ERROR:$g_product start failed:Firewall state not changed" diff --git a/Shorewall/Perl/prog.header6 b/Shorewall/Perl/prog.header6 index b5d0ae5ba..04dce7cc2 100644 --- a/Shorewall/Perl/prog.header6 +++ b/Shorewall/Perl/prog.header6 @@ -626,6 +626,12 @@ fatal_error() startup_error() # $* = Error Message { echo " ERROR: $@: Firewall state not changed" >&2 + + if [ $LOG_VERBOSITY -ge 0 ]; then + timestamp="$(date +'%_b %d %T') " + echo "${timestamp} ERROR: $@" >> $STARTUP_LOG + fi + case $COMMAND in start) logger -p kern.err "ERROR:$g_product start failed:Firewall state not changed"