X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fchecks%2Fdsa-check-timedatectl;h=1c61cf3253107371bce9660283867859a72f578d;hb=2439481805151ab7cd33e668ae2b4efc931bb94a;hp=3711fc149ee34af25c5411eea1271ef4614ebbcb;hpb=cea5e8bf3275a6077d24d146b0aa4fb729af0538;p=mirror%2Fdsa-nagios.git 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")