From fc1669e059bcdb0bfe9aeda0cedb5b5c9051a0ba Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 31 Jul 2009 22:24:46 +1000 Subject: Fix setup_samba.sh script for ctdb >= 1.0.78. ctdb 1.0.78 changes the format of the output of "ctdb -Y status", causing the cluster_is_healthy() function in base/root/scripts/functions to always fail. This relaxes the matching to look for a 1 bit in the output for a node rather than a particular number of 0s. Signed-off-by: Martin Schwenke --- base/root/scripts/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'base/root/scripts/functions') diff --git a/base/root/scripts/functions b/base/root/scripts/functions index be320fe..69952a6 100644 --- a/base/root/scripts/functions +++ b/base/root/scripts/functions @@ -9,7 +9,7 @@ cluster_is_healthy () count=0 while read line ; do count=$(($count + 1)) - [ "${line#:*:*:}" != "0:0:0:0:" ] && cat >/dev/null && return 1 + [ "${line##:*:*:*1:}" != "$line" ] && cat >/dev/null && return 1 done [ $count -gt 0 ] && return $? } -- cgit