This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: STABLE3 - cman init: clean up status check a bit more


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=7d1e5164ddb83d3fa872fab61f32a9d40cbf777e
Commit:        7d1e5164ddb83d3fa872fab61f32a9d40cbf777e
Parent:        c28af633d98166d3349f3f1163c18bccb514d2b1
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Thu Mar 26 11:57:23 2009 +0100
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Fri Mar 27 20:05:46 2009 +0100

cman init: clean up status check a bit more

also make cman_running check more useful

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 cman/init.d/cman.in |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 52709f4..65e02aa 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -700,26 +700,30 @@ stop()
 cmanstatus()
 {
 	errmsg=$( status corosync 2>&1 ) || return 1
-	cman_running || return 1
+
+	if ! cman_running; then
+		errmsg="cman is not running"
+		return 1
+	fi
 
 	if qdiskd_enabled; then
-		errmsg=$( status qdiskd 2>&1) || return 1
+		errmsg=$( status qdiskd 2>&1 ) || return 1
 	fi
 
 	if groupd_enabled; then
-		errmsg=$( status groupd 2>&1) || return 1
+		errmsg=$( status groupd 2>&1 ) || return 1
 	fi
 
-	errmsg=$( status fenced 2>&1) || return 1
-	errmsg=$( status dlm_controld 2>&1) || return 1
-	errmsg=$( status gfs_controld 2>&1) || return 1
+	errmsg=$( status fenced 2>&1 ) || return 1
+	errmsg=$( status dlm_controld 2>&1 ) || return 1
+	errmsg=$( status gfs_controld 2>&1 ) || return 1
 
 	if cmannotifyd_enabled; then
-		errmsg=$( status cmannotifyd 2>&1) || return 1
+		errmsg=$( status cmannotifyd 2>&1 ) || return 1
 	fi
 
 	if fence_xvmd_enabled; then
-		errmsg=$( status fence_xvmd 2>&1) || return 1
+		errmsg=$( status fence_xvmd 2>&1 ) || return 1
 	fi
 
 	return 0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]