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

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

 



ACK

Fabio

On 10/7/2014 5:52 PM, Jan Friesse wrote:
> 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
>  }
> 
_______________________________________________
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