BF: debian/fail2ban.init - fixed handling of the return code from do_start/do_stop

pull/808/head
Yaroslav Halchenko 2013-06-19 21:56:35 -04:00
parent 39699896aa
commit b89e6ca770
2 changed files with 14 additions and 5 deletions

7
debian/changelog vendored
View File

@ -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 <debian@onerussian.com> Wed, 19 Jun 2013 21:56:01 -0400
fail2ban (0.8.10-1) unstable; urgency=high
* New upstream release

View File

@ -176,8 +176,10 @@ do_reload() {
#
log_end_msg_wrapper()
{
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