From: Peter Palfrader Date: Fri, 17 Feb 2017 15:54:19 +0000 (+0100) Subject: clean locales for timedatectl call X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-nagios.git;a=commitdiff_plain;h=11cc61f8f6fd9d7940ab4fbf2c2a6cda82cd2e29 clean locales for timedatectl call --- diff --git a/dsa-nagios-checks/checks/dsa-check-timedatectl b/dsa-nagios-checks/checks/dsa-check-timedatectl index 3711fc1..1c61cf3 100755 --- a/dsa-nagios-checks/checks/dsa-check-timedatectl +++ b/dsa-nagios-checks/checks/dsa-check-timedatectl @@ -61,7 +61,7 @@ fi temp="$(mktemp)" trap "rm -f '$temp'" EXIT -timedatectl > "$temp" +LC_ALL=C timedatectl > "$temp" ut=$(sed '/Universal time:/ { s/^[^:]*: *//; p}; d' "$temp") rtc=$(sed '/RTC time:/ { s/^[^:]*: *//; p}; d' "$temp") ntpenabled=$(sed '/\(NTP enabled\|Network time on\):/ { s/^[^:]*: *//; p}; d' "$temp")