public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: "Fabio M. Di Nitto" <fabbione@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: STABLE3 - cman init: add support for join and leave options
Date: Fri, 15 May 2009 06:07:00 -0000	[thread overview]
Message-ID: <20090515060655.52E8812026F@lists.fedorahosted.org> (raw)

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
 }


                 reply	other threads:[~2009-05-15  6:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090515060655.52E8812026F@lists.fedorahosted.org \
    --to=fabbione@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).