clean locales for timedatectl call
authorPeter Palfrader <peter@palfrader.org>
Fri, 17 Feb 2017 15:54:19 +0000 (16:54 +0100)
committerPeter Palfrader <peter@palfrader.org>
Fri, 17 Feb 2017 15:54:19 +0000 (16:54 +0100)
dsa-nagios-checks/checks/dsa-check-timedatectl

index 3711fc1..1c61cf3 100755 (executable)
@@ -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")