X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=config%2Ffunctions;h=4acfc4ffab3f4347dce18f23be6a2e1f0e8c4be9;hb=d0b790de08b9c9226ac9848b434a051d99a41dd8;hp=610085b67700feb1faad5c715df79cb506ff4cde;hpb=62179c80701cd4f773afaba54cde577de234f72d;p=sahlberg%2Fctdb.git diff --git a/config/functions b/config/functions index 610085b6..4acfc4ff 100755 --- a/config/functions +++ b/config/functions @@ -571,6 +571,19 @@ ctdb_check_counter_limit () { echo "WARNING: less than $_limit consecutive failures ($_size) for $service_name, not unhealthy yet" fi } +ctdb_check_counter_equal () { + _ctdb_counter_common + + _limit=$1 + + # unary counting! + _size=$(stat -c "%s" "$_counter_file" 2>/dev/null || echo 0) + if [ $_size -eq $_limit ] ; then + return 1 + fi + return 0 +} + ######################################################## ctdb_spool_dir="/var/spool/ctdb"