redhat-cluster (3.0.12-2) 0003-Don-t-rely-on-chkconfig-and-check-for-network-manage.patch

Summary

 cman/init.d/cman.in |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Wed, 10 Mar 2010 22:24:42 +0100
Subject: [PATCH] Don't rely on chkconfig and check for network-manager

as it's called on Debian based distros.
---
 cman/init.d/cman.in |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index dc98cfd..8335c2b 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -295,9 +295,14 @@ sshd_enabled()
 
 network_manager_enabled()
 {
+	if type chkconfig >/dev/null 2>&1 && chkconfig NetworkManager; then
+		errmsg="\nNetwork Manager is configured to run. Please disable it in the cluster."
+		return 1
+	fi
+
 	if status NetworkManager > /dev/null 2>&1 || \
-	   chkconfig NetworkManager; then
-		errmsg="\nNetwork Manager is either running or configured to run. Please disable it in the cluster."
+	   status network-manager > /dev/null; then
+		errmsg="\nNetwork Manager is running. Please disable it in the cluster."
 		return 1
 	fi
 	return 0
--