1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Make 'chrony' work with busybox awk

This commit is contained in:
Matt Merhar 2021-03-09 23:00:06 -05:00 committed by Lars Kruse
parent 4a25b7de16
commit 4c1903fe29

View file

@ -118,7 +118,7 @@ echo "$fields" | while read fieldname factor regex label; do
value="U"
else
# the keyword "slow" indicates negative values
value="$(echo "$status_line" | awk '{ /slow/ ? SIGN=-1 : SIGN=1; print $1 * SIGN * '"$factor"' }')"
value="$(echo "$status_line" | awk '{ /slow/ ? (SIGN=-1) : (SIGN=1); print $1 * SIGN * '"$factor"' }')"
fi
echo "${fieldname}.value $value"
done