public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - cman init: add cman_running local function
@ 2009-03-27 19:07 Fabio M. Di Nitto
0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-03-27 19:07 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4c237dd55d272ee11ba97ffd9a730a3d83ff6069
Commit: 4c237dd55d272ee11ba97ffd9a730a3d83ff6069
Parent: baa58122d5fb7957c2955cb39ed32613a9edb664
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Wed Mar 25 15:25:48 2009 +0100
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Fri Mar 27 20:05:46 2009 +0100
cman init: add cman_running local function
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
cman/init.d/cman.in | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 8cc224c..801ed19 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -179,6 +179,12 @@ xend_bridged_net_enabled() {
return 0
}
+cman_running()
+{
+ @SBINDIR@/cman_tool status > /dev/null 2>&1
+ return $?
+}
+
fence_join_enabled()
{
#
@@ -209,7 +215,7 @@ fence_xvmd_enabled()
# (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 @SBINDIR@/cman_tool status > /dev/null 2>&1; then
+ if cman_running; then
if [ "$FENCE_XVMD_OPTS" = "${FENCE_XVMD_OPTS/-X/}" ]; then
@SBINDIR@/ccs_tool query /cluster/fence_xvmd || return 1
fi
@@ -262,6 +268,8 @@ cmannotifyd_enabled()
esac
}
+### the real stuff starts here
+
load_modules()
{
errmsg=$( /sbin/modprobe configfs 2>&1 ) || return 1
@@ -282,7 +290,7 @@ start_configfs()
start_cman()
{
# cman
- if ! @SBINDIR@/cman_tool status > /dev/null 2>&1; then
+ if ! cman_running; then
case "$CONFIG_LOADER" in
ldapconfig)
if [ -n "$LDAP_URL" ] || [ -n "$LDAP_BASEDN" ]; then
@@ -531,7 +539,7 @@ stop_configfs()
stop_cman()
{
- if @SBINDIR@/cman_tool status > /dev/null 2>&1; then
+ if cman_running; then
errmsg=$( @SBINDIR@/cman_tool -t $CMAN_SHUTDOWN_TIMEOUT \
-w leave $1 2>&1 ) || return 1
fi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-27 19:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-27 19:07 cluster: STABLE3 - cman init: add cman_running local function Fabio M. Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).