From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] cman init: add support for "nocluster" kernel cmdline to not start cman at boot
Date: Thu, 6 Jan 2011 12:04:15 +0100 [thread overview]
Message-ID: <1294311855-7407-1-git-send-email-fdinitto@redhat.com> (raw)
the init script will continue to work as expected from any console/tty
Resolves: rhbz#563901
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
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 a5dfa86..45a607e 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -305,6 +305,16 @@ gfs_controld_enabled()
return 1
}
+cluster_disabled_at_boot()
+{
+ if grep -q nocluster /proc/cmdline && \
+ [ "$(tty)" = "/dev/console" ]; then
+ errmsg="not configured to run at boot"
+ return 1
+ fi
+ return 0
+}
+
network_manager_enabled()
{
if status NetworkManager > /dev/null 2>&1 || \
@@ -713,6 +723,10 @@ start()
echo $echoarg "Starting cluster: "
+ runwrap cluster_disabled_at_boot \
+ none \
+ "Checking if cluster has been disabled at boot"
+
runwrap network_manager_enabled \
none \
"Checking Network Manager"
--
1.7.2.3
next reply other threads:[~2011-01-06 11:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 11:04 Fabio M. Di Nitto [this message]
2011-01-12 14:45 ` [Cluster-devel] [PATCH] cman init: add support for "nocluster" kernel cmdline to not start cman at boot Lon Hohberger
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=1294311855-7407-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).