public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - cman init: add support for join and leave options
@ 2009-05-15 6:07 Fabio M. Di Nitto
0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-05-15 6:07 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b11739b572d52d03e6ddddea07e62600fcf191c5
Commit: b11739b572d52d03e6ddddea07e62600fcf191c5
Parent: 6c4dea2b599fc9f461a7e1063f36a772c8e7d15f
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Fri May 15 08:05:36 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Fri May 15 08:05:36 2009 +0200
cman init: add support for join and leave options
Some users might require special cman_tool options on join and leave
operations.
Add support via /etc/sysconfig/cman or distro equivalent using
CMAN_JOIN_OPTS and CMAN_LEAVE_OPTS config options.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
cman/init.d/cman.in | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 38c3fbb..fb12d3b 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -122,7 +122,16 @@ fi
# The default script is "network-bridge".
[ -z "$NETWORK_BRIDGE_SCRIPT" ] && NETWORK_BRIDGE_SCRIPT="network-bridge"
-[ -n "$CLUSTERNAME" ] && cman_join_opts="-c $CLUSTERNAME"
+# CMAN_JOIN_OPTS -- allows extra options to be passed to cman_tool when join
+# operation is performed.
+# NOTES:
+# $CLUSTERNAME automatically appends "-c $CLUSTERNAME"
+# $NODENAME automatically appends "-n $NODENAME"
+# $CONFIG_LOADER automatically appends "-C $CONFIG_LOADER"
+
+[ -n "$CMAN_JOIN_OPTS" ] && cman_join_opts="$CMAN_JOIN_OPTS"
+
+[ -n "$CLUSTERNAME" ] && cman_join_opts+="-c $CLUSTERNAME"
[ -n "$NODENAME" ] && cman_join_opts+=" -n $NODENAME"
@@ -139,6 +148,10 @@ fi
# openaisparser - use internal openais config file parser.
[ -n "$CONFIG_LOADER" ] && cman_join_opts+=" -C $CONFIG_LOADER"
+# CMAN_LEAVE_OPTS -- allows extra options to be passed to cman_tool when leave
+# operation is performed.
+[ -n "$CMAN_LEAVE_OPTS" ] && cman_leave_opts="$CMAN_LEAVE_OPTS"
+
# INITLOGLEVEL -- select how verbose the init script should be
# possible values:
# quiet - only one line notification for start/stop operations
@@ -477,7 +490,7 @@ start_cman()
stop_cman()
{
if cman_running; then
- errmsg=$( cman_tool -t $CMAN_SHUTDOWN_TIMEOUT \
+ errmsg=$( cman_tool $cman_leave_opts -t $CMAN_SHUTDOWN_TIMEOUT \
-w leave $cmanremove 2>&1 ) || return 1
fi
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-15 6:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-15 6:07 cluster: STABLE3 - cman init: add support for join and leave options 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).