From 20a713f6c2d155d3144464b775adcded7d2e3c32 Mon Sep 17 00:00:00 2001 From: tochev Date: Fri, 30 May 2014 15:26:43 +0300 Subject: [PATCH] ntp_pool_score: fix negative values --- plugins/time/ntp_pool_score_ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/time/ntp_pool_score_ b/plugins/time/ntp_pool_score_ index be3218c9..1e5ce7d4 100755 --- a/plugins/time/ntp_pool_score_ +++ b/plugins/time/ntp_pool_score_ @@ -77,7 +77,7 @@ SCORE=$(wget "http://www.pool.ntp.org/scores/$target/log?limit=1" \ --timeout=30 -O - 2>/dev/null \ | tail -n 1 | awk -F ',' '{print $5}') -if echo "$SCORE" | grep -q '^[0-9.]\+$'; then +if echo "$SCORE" | grep -q '^-\?[0-9.]\+$'; then echo "score.value $SCORE" else echo "score.value U"