cluster: STABLE31 - rgmanager: fix init script status return code to not overwrite global var

Fabio M. Di Nitto fabbione at fedoraproject.org
Wed Aug 31 09:11:41 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b694e7ab032697280ed330423b5200ae92b1c8db
Commit:        b694e7ab032697280ed330423b5200ae92b1c8db
Parent:        b843e89a54d9bdc9750b529f59405040b4b780db
Author:        Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate:    Wed Aug 31 11:11:15 2011 +0200
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Wed Aug 31 11:11:15 2011 +0200

rgmanager: fix init script status return code to not overwrite global var

Reported by Dietmar Maurer <dietmar at proxmox.com>

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

diff --git a/rgmanager/init.d/rgmanager.in b/rgmanager/init.d/rgmanager.in
index 9e5a050..5b7219c 100644
--- a/rgmanager/init.d/rgmanager.in
+++ b/rgmanager/init.d/rgmanager.in
@@ -33,13 +33,13 @@ failure()
 status()
 {
 	pid=$(pidof $1 2>/dev/null)
-	rtrn=$?
-	if [ $rtrn -ne 0 ]; then
+	statusrtrn=$?
+	if [ $statusrtrn -ne 0 ]; then
 		echo "$1 is stopped"
 	else
 		echo "$1 (pid $pid) is running..."
 	fi
-	return $rtrn
+	return $statusrtrn
 }
 
 # rpm based distros


More information about the cluster-commits mailing list