From b5fd4446a7a601cb91f4c2df4fc48caf5b7c7a9c Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 9 Mar 2009 19:53:39 +1000 Subject: [PATCH] Fix status display functions The status display functions were returning the opposite of what they should have been. Also made cosmetic changes to the output. Signed-off-by: Allan McRae --- functions | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/functions b/functions index 9eb6c80..34285dd 100644 --- a/functions +++ b/functions @@ -170,16 +170,17 @@ stop_daemon() { # Status functions status_started() { deltext - echo -ne " $C_OTHER[${C_STRT}STARTED$C_OTHER]$C_CLEAR " + echo -ne "$C_OTHER[${C_STRT}STARTED$C_OTHER]$C_CLEAR " } status_stopped() { deltext - echo -ne " $C_OTHER[${C_STRT}STOPPED$C_OTHER]$C_CLEAR " + echo -ne "$C_OTHER[${C_STRT}STOPPED$C_OTHER]$C_CLEAR " } ck_status() { - if ck_daemon $1; then + ck_daemon $1 + if [ $? -eq 1 ]; then status_started else status_stopped -- 1.6.2