cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] cman init: add support for "nocluster" kernel cmdline to not start cman at boot
@ 2011-01-06 11:04 Fabio M. Di Nitto
  2011-01-12 14:45 ` Lon Hohberger
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio M. Di Nitto @ 2011-01-06 11:04 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH] cman init: add support for "nocluster" kernel cmdline to not start cman at boot
  2011-01-06 11:04 [Cluster-devel] [PATCH] cman init: add support for "nocluster" kernel cmdline to not start cman at boot Fabio M. Di Nitto
@ 2011-01-12 14:45 ` Lon Hohberger
  0 siblings, 0 replies; 2+ messages in thread
From: Lon Hohberger @ 2011-01-12 14:45 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On Thu, 2011-01-06 at 12:04 +0100, Fabio M. Di Nitto wrote:
> the init script will continue to work as expected from any console/tty
> 
> Resolves: rhbz#563901

Reviewed; ACK

-- Lon




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-12 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-06 11:04 [Cluster-devel] [PATCH] cman init: add support for "nocluster" kernel cmdline to not start cman at boot Fabio M. Di Nitto
2011-01-12 14:45 ` Lon Hohberger

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).