From b89e6ca770c6d42e909ab0fba479ca7609d63e58 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 19 Jun 2013 21:56:35 -0400 Subject: [PATCH] BF: debian/fail2ban.init - fixed handling of the return code from do_start/do_stop --- debian/changelog | 7 +++++++ debian/fail2ban.init | 12 +++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 20bb5be9..5580087d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +fail2ban (0.8.10-2) unstable; urgency=low + + * debian/fail2ban.init: + - fixed handling of the return code from do_start/do_stop + + -- Yaroslav Halchenko Wed, 19 Jun 2013 21:56:01 -0400 + fail2ban (0.8.10-1) unstable; urgency=high * New upstream release diff --git a/debian/fail2ban.init b/debian/fail2ban.init index c57a1899..97f767c6 100755 --- a/debian/fail2ban.init +++ b/debian/fail2ban.init @@ -176,8 +176,10 @@ do_reload() { # log_end_msg_wrapper() { - [ $1 -lt $2 ] && value=0 || value=1 - log_end_msg $value + if [ "$3" != "no" ]; then + [ $1 -lt $2 ] && value=0 || value=1 + log_end_msg $value + fi } command="$1" @@ -185,13 +187,13 @@ case "$command" in start|force-start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start "$command" - [ "$VERBOSE" != no ] && log_end_msg_wrapper $? 2 + log_end_msg_wrapper $? 2 "$VERBOSE" ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop - [ "$VERBOSE" != no ] && log_end_msg_wrapper $? 2 + log_end_msg_wrapper $? 2 "$VERBOSE" ;; restart|force-reload) @@ -200,7 +202,7 @@ case "$command" in case "$?" in 0|1) do_start - log_end_msg_wrapper $? 1 + log_end_msg_wrapper $? 1 "always" ;; *) # Failed to stop