Skip to contentSkip to conversation

Cluster Project branch, master, updated. cluster-2.99.06-75-ge14f899

Cluster-devel [email protected] 1 participant 1 message Jul 28, 2008

lore
Share & tools
lore
#0 lore raw

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=e14f8997dc1e672523fbf4f942ddc0a75ae9b8a1

The branch, master has been updated

       via  e14f8997dc1e672523fbf4f942ddc0a75ae9b8a1 (commit)
      from  4b063b36535e69b2226170d63d8f94c16d6055c6 (commit)

Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.

- Log ----------------------------------------------------------------- commit e14f8997dc1e672523fbf4f942ddc0a75ae9b8a1

Author: Fabio M. Di Nitto <[email protected]>
Date:   Mon Jul 28 06:23:11 2008 +0200

cman: init script should not user cluster.conf directly

fence_xvmd function needs to query the config to know if the daemon should start or not.

switch an xmllint call to a ccs_tool query and remove hardcoded dependency on cluster.conf

-----------------------------------------------------------------------

Summary of changes:

 cman/init.d/Makefile          |   16 ++++------------
 cman/init.d/{cman.in => cman} |   17 ++++++++++-------
 2 files changed, 14 insertions(+), 19 deletions(-)
 rename cman/init.d/{cman.in => cman} (98%)
cman/init.d/Makefile +4 -12
index 954dd27..1f7f5f4 100644
@@ -1,19 +1,11 @@
-TARGET=cman
+TARGET=cman qdiskd
 
-INITDT=$(TARGET) qdiskd
+INITDT=$(TARGET)
 
-all: $(TARGET)
+all:
 
 include ../../make/defines.mk
-include $(OBJDIR)/make/clean.mk
 include $(OBJDIR)/make/install.mk
 include $(OBJDIR)/make/uninstall.mk
 
-$(TARGET):
-	cat $(S)/$(TARGET).in | sed \
-		-e 's#@CONFDIR@#${CONFDIR}#g' \
-		-e 's#@CONFFILE@#${CONFFILE}#g' \
-	> $(TARGET)
-	chmod 755 $(TARGET)
-
-clean: generalclean
+clean:
cman/init.d/cman renamed from cman/init.d/cman.in +10 -7
similarity index 98%
rename from cman/init.d/cman.in
rename to cman/init.d/cman
index 1134e80..f489dd1 100644
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/BIN/BAsh
 #
 # cman - Cluster Manager init script
 #
@@ -235,17 +235,20 @@ fence_xvmd_enabled()
     # running on a machine capable of running xvmd.
     #
     which xm &> /dev/null || return 1
-	
+
     #
     # Check for presence of /cluster/fence_xvmd in cluster.conf
     # (If -X is specified, it doesn't matter if it's in cluster.conf;
     #  we'll start it anyway since ccsd is not required)
     #
-    if [ "$FENCE_XVMD_OPTS" = "${FENCE_XVMD_OPTS/-X/}" ]; then
-        xmllint --shell @CONFDIR@/@CONFFILE@ 2> /dev/null \
-            < <(echo ls cluster) | grep -q fence_xvmd || return 1
-    fi   
-    
+    /sbin/cman_tool status &> /dev/null
+    if [ $? -eq 0 ]
+    then
+	if [ "$FENCE_XVMD_OPTS" = "${FENCE_XVMD_OPTS/-X/}" ]; then
+		ccs_tool query /cluster/fence_xvmd || return 1
+	fi
+    fi
+
     return 0
 }
 

hooks/post-receive
--
Cluster Project