cluster: STABLE3 - cman init: fix unfencing return code

Fabio M. Di Nitto fabbione at fedoraproject.org
Thu Nov 19 18:26:24 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6a930f7a0ba90bbcc3ce2f6ecd5730bfde20e183
Commit:        6a930f7a0ba90bbcc3ce2f6ecd5730bfde20e183
Parent:        48ad1536e81af0673b4c4e3cc46f679bdb73530e
Author:        Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate:    Thu Nov 19 19:25:26 2009 +0100
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Thu Nov 19 19:25:26 2009 +0100

cman init: fix unfencing return code

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 cman/init.d/cman.in |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index fc29101..e864acf 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -663,12 +663,14 @@ unfence_self()
 {
 	# fence_node returns 0 on success, 1 on failure, 2 if unconfigured
 	# 0 and 2 are ok. Everything else should report error.
-	fence_node -U > /dev/null 2>&1
+	fence_err=$(fence_node -U 2>&1)
 	case $? in
 	0|2)
 		return 0
 	;;
 	esac
+	errmsg="$fence_err"
+	return 1
 }
 
 join_fence_domain()


More information about the cluster-commits mailing list