mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Eventscript functions: fix counter regression.
d362be7d32079ac1390d67056ce107bfbca2c937 wasn't well thought out. Subsequent commits depend on ctdb_counter_init() taking an argument, so this makes those cases work. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 05a8fcfbac3da2b5843b31e0fe258255cc761190)
This commit is contained in:
parent
217edfa1c8
commit
1b956b2b0a
@ -520,18 +520,18 @@ _ctdb_counter_common () {
|
||||
mkdir -p "${_counter_file%/*}" # dirname
|
||||
}
|
||||
ctdb_counter_init () {
|
||||
_ctdb_counter_common "$@"
|
||||
_ctdb_counter_common "$1"
|
||||
|
||||
>"$_counter_file"
|
||||
}
|
||||
ctdb_counter_incr () {
|
||||
_ctdb_counter_common "$@"
|
||||
_ctdb_counter_common "$1"
|
||||
|
||||
# unary counting!
|
||||
echo -n 1 >> "$_counter_file"
|
||||
}
|
||||
ctdb_check_counter_limit () {
|
||||
_ctdb_counter_common "$@"
|
||||
_ctdb_counter_common
|
||||
|
||||
_limit="${1:-${service_fail_limit}}"
|
||||
_quiet="$2"
|
||||
@ -546,7 +546,7 @@ ctdb_check_counter_limit () {
|
||||
fi
|
||||
}
|
||||
ctdb_check_counter_equal () {
|
||||
_ctdb_counter_common "$@"
|
||||
_ctdb_counter_common
|
||||
|
||||
_limit=$1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user