Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 3f74b2c7410fbfc3432391b5603d1082fbceb340
Parent: 9a20e576b54a17841c6bb8a4795a253ecb8a4561
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Thu Jan 6 12:00:04 2011 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Jan 12 16:23:05 2011 +0100
cman init: add support for "nocluster" kernel cmdline to not start cman at boot
the init script will continue to work as expected from any console/tty
Resolves: rhbz#563901
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)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 a6545aa..ea8293c 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -289,6 +289,16 @@ sshd_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 || \
@@ -679,6 +689,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"