summaryrefslogtreecommitdiffstats
path: root/base/root/scripts
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2009-07-31 22:24:46 +1000
committerMartin Schwenke <martin@meltin.net>2009-07-31 22:24:46 +1000
commitfc1669e059bcdb0bfe9aeda0cedb5b5c9051a0ba (patch)
tree20be1485c7a1704b7a8e21fbc29841d0dee84b37 /base/root/scripts
parent9d424e19d7235eb6162605ef888b4b5f36230f4a (diff)
downloadautocluster-fc1669e059bcdb0bfe9aeda0cedb5b5c9051a0ba.tar.gz
autocluster-fc1669e059bcdb0bfe9aeda0cedb5b5c9051a0ba.tar.xz
autocluster-fc1669e059bcdb0bfe9aeda0cedb5b5c9051a0ba.zip
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 <martin@meltin.net>
Diffstat (limited to 'base/root/scripts')
-rw-r--r--base/root/scripts/functions2
1 files changed, 1 insertions, 1 deletions
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 $?
}