[PATCH] init: change return value when starting corosync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When corosync is started by systemd, it would be considered
as failed because it returns a non-zero value, even though it
starts sucessfully.

Modified according to Jan's suggestion

Signed-off-by: Lidong Zhong <lzhong@xxxxxxxx>
Signed-off-by: Xia Li<xli@xxxxxxxx>
---
 init/corosync.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/init/corosync.in b/init/corosync.in
index 4bc6041..9b9c66f 100755
--- a/init/corosync.in
+++ b/init/corosync.in
@@ -39,13 +39,13 @@ failure()
 status()
 {
 	pid=$(pidof $1 2>/dev/null)
-	rtrn=$?
-	if [ $rtrn -ne 0 ]; then
+	res=$?
+	if [ $res -ne 0 ]; then
 		echo "$1 is stopped"
 	else
 		echo "$1 (pid $pid) is running..."
 	fi
-	return $rtrn
+	return $res
 }
 
 # rpm based distros
-- 
1.8.1.4

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss




[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux