From 11cc61f8f6fd9d7940ab4fbf2c2a6cda82cd2e29 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 17 Feb 2017 16:54:19 +0100 Subject: [PATCH] clean locales for timedatectl call --- dsa-nagios-checks/checks/dsa-check-timedatectl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- 2.20.1