The word "passing" is ambiguous, since it could refer to whether a
value is passed to the function. "exceeding" is wrong, because the
counter is equal. Instead, use "reaching".
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
"$_thing" \
"$_usage" \
"$_unhealthy_threshold"
- # Only run unhealthy callout if passing the
- # unhealthy threshold. That is, if the
+ # Only run unhealthy callout when reaching
+ # the unhealthy threshold. That is, if the
# previous usage was below the threshold.
if [ "$_prev" -lt "$_unhealthy_threshold" ]; then
+ # eval of "" is a no-op
eval "$_unhealthy_callout"
fi
echo "$_usage" >"$_cache"
"$_thing" \
"$_failcount" \
"$_unhealthy_threshold"
- # Only print output when exceeding the
+ # Only print output when reaching the
# unhealthy threshold
if [ "$_failcount" -eq "$_unhealthy_threshold" ] &&
[ -n "$_output" ]; then
"$_failcount" \
"$_warn_threshold"
if [ "$_failcount" -eq "$_warn_threshold" ] && [ -n "$_output" ]; then
- # Only print output when exceeding the warning threshold
+ # Only print output when reaching the warning threshold
echo "$_output"
fi
}