Commit 2797b4b6 authored by Mike Hibler's avatar Mike Hibler

Change the interpretation of the loadinfo HEARTBEAT value.

Zero means disable, anything non-zero means "let the server decide".
parent df78b7ef
...@@ -394,8 +394,9 @@ loadone() { ...@@ -394,8 +394,9 @@ loadone() {
fi fi
# #
# Current semantics:
# HEARTBEAT==0: no heartbeat # HEARTBEAT==0: no heartbeat
# ow: send report at specified interval (<= one hour) # ow: enable heartbeat, but let server dictate (-H 0)
# #
HB="" HB=""
case "$HEARTBEAT" in case "$HEARTBEAT" in
...@@ -403,12 +404,8 @@ loadone() { ...@@ -403,12 +404,8 @@ loadone() {
echo "Ignoring bogus HEARTBEAT value \"$HEARTBEAT\"" echo "Ignoring bogus HEARTBEAT value \"$HEARTBEAT\""
;; ;;
*) *)
if [ $HEARTBEAT -le 0 -o $HEARTBEAT -gt 3600 ]; then if [ $HEARTBEAT -gt 0 ]; then
if [ $HEARTBEAT -ne 0 ]; then HB="-H 0"
echo "Ignoring bad HEARTBEAT value \"$HEARTBEAT\""
fi
else
HB="-H $HEARTBEAT"
fi fi
;; ;;
esac esac
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment