cluster: STABLE31 - cman init: add support for "nocluster" kernel cmdline to not start cman at boot
Fabio M. Di Nitto
fabbione at fedoraproject.org
Thu Jan 6 11:02:43 UTC 2011
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=deb7f90e820250a7bfad9c94abaf1b49ca62bf7d
Commit: deb7f90e820250a7bfad9c94abaf1b49ca62bf7d
Parent: 3dc277e676bcc1fdb6be9d1746132594da64638b
Author: Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate: Thu Jan 6 12:00:04 2011 +0100
Committer: Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Thu Jan 6 12:02:12 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 at 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"
More information about the cluster-commits
mailing list