Skip to contentSkip to conversation

cman init: add support for "nocluster" kernel cmdline to not start cman at boot

PATCH New Fabio M. Di Nitto 2 participants 2 messages Jan 6, 2011 – Jan 12, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 cman/init.d/cman.in |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
cman/init.d/cman.in +14 -0
index a5dfa86..45a607e 100644
@@ -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"
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/1 cman init: add support for "nocluster" kernel cmdline to not start cman at boot

Quoted 3 lines · Fabio M. Di Nitto

the init script will continue to work as expected from any console/tty

Resolves: rhbz#563901

Reviewed; ACK

-- Lon