From 4c1903fe29172154096e6a10fda5bcd082c42de8 Mon Sep 17 00:00:00 2001 From: Matt Merhar Date: Tue, 9 Mar 2021 23:00:06 -0500 Subject: [PATCH] Make 'chrony' work with busybox awk --- plugins/chrony/chrony | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chrony/chrony b/plugins/chrony/chrony index af27cf1a..40e2c0e6 100755 --- a/plugins/chrony/chrony +++ b/plugins/chrony/chrony @@ -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