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: prepare for fence_xvmd standaloneoperations


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f2403d0b27b164f575af8edcfd52ffe097d17e97
Commit:        f2403d0b27b164f575af8edcfd52ffe097d17e97
Parent:        c9f692f5fb5116bdb5723c2959e31dd61de8a2bf
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Tue Mar 31 08:47:09 2009 +0200
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Tue Mar 31 08:47:09 2009 +0200

cman init: prepare for fence_xvmd standalone operations

implement simple and generic check to parse FENCE_XVMD_OPTS.

implement generic check to verify if fence_xvmd should run
standalone.

switch fence_xvmd_enabled to use check_fence_opt for ccs operations.

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

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index e26627d..3324268 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -337,6 +337,19 @@ fence_join_enabled()
 	fi
 }
 
+check_fence_opt()
+{
+	for i in $(getopt dfi:a:p:I:C:U:c:k:u?hLXV $FENCE_XVMD_OPTS); do
+		[ -$1 = $i ] && return 0
+	done
+	return 1
+}
+
+fence_xvmd_standalone()
+{
+	check_fence_opt L
+}
+
 fence_xvmd_enabled()
 {
 	fence_join_enabled || return 1
@@ -347,7 +360,7 @@ fence_xvmd_enabled()
 	#  we'll start it anyway since ccsd is not required)
 	#
 	if cman_running && \
-		[ "$FENCE_XVMD_OPTS" = "${FENCE_XVMD_OPTS/-X/}" ]; then
+		! check_fence_opt X; then
 			ccs_tool query /cluster/fence_xvmd \
 				> /dev/null 2>&1 || return 1
 	fi


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