[PATCH] init: Don't wait for ipc if corosync doesn't start

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

 



Init script now checks return code of executing corosync command. If it
fails, ipc_wait section is skipped, resulting in much faster failure of
init script.

Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
---
 init/corosync.in | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/init/corosync.in b/init/corosync.in
index 9b9c66f..c93f971 100755
--- a/init/corosync.in
+++ b/init/corosync.in
@@ -115,12 +115,13 @@ start()
 	else
 		$prog $COROSYNC_OPTIONS > /dev/null 2>&1
 
-		if ! wait_for_ipc; then
+		if [ "$?" != 0 ] || ! wait_for_ipc; then
 			failure
 			rtrn=1
+		else
+			touch $LOCK_FILE
+			success
 		fi
-		touch $LOCK_FILE
-		success
 	fi
 	echo
 }
-- 
1.8.3.1

_______________________________________________
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