From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] Cman: test that corosync is not already running
Date: Thu, 6 Jan 2011 11:28:42 +0100 [thread overview]
Message-ID: <1294309722-6131-1-git-send-email-fdinitto@redhat.com> (raw)
From: Jan Friesse <jfriesse@redhat.com>
Patch fixes init file so now before cman start is tested, if corosync is
running. If so, init script will refuse to start.
Resolves: rhbz#617234
---
cman/init.d/cman.in | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 7dae24d..6dfc119 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -521,11 +521,25 @@ stop_configfs()
fi
}
+corosync_running()
+{
+ [ -f /var/run/corosync.pid ] || return 1
+
+ read corosync_pid foo < /var/run/corosync.pid
+ if [ "$(pidof corosync)" == "$corosync_pid" ];then
+ errmsg="Corosync Cluster Engine is already running"
+ return 0
+ fi
+
+ return 1
+}
+
start_cman()
{
check_exec cman_tool || return $?
cman_running && return 0
cman_checkconfig || return 1
+ corosync_running && return 1
tmpfile=$(mktemp -t cmanstartup.XXXXXXXXXX)
if [ -z "$tmpfile" ]; then
--
1.7.2.3
next reply other threads:[~2011-01-06 10:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 10:28 Fabio M. Di Nitto [this message]
2011-01-06 10:37 ` [Cluster-devel] [PATCH] Cman: test that corosync is not already running Fabio M. Di Nitto
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=1294309722-6131-1-git-send-email-fdinitto@redhat.com \
--to=fdinitto@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 NNTP newsgroup(s).