Просмотр исходного кода

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

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@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Jan Friesse 11 лет назад
Родитель
Сommit
b627844f3d
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      init/corosync.in

+ 4 - 3
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
 }