From: Peter Palfrader Date: Mon, 23 Jan 2017 12:41:57 +0000 (+0100) Subject: dsa-check-timedatectl: Accept "Network time on" string also instead of just "NTP... X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-nagios.git;a=commitdiff_plain;h=effe32e023a31c74f7eec97405fd06262780c378 dsa-check-timedatectl: Accept "Network time on" string also instead of just "NTP enabled" (stretch vs. jessie?) --- diff --git a/dsa-nagios-checks/checks/dsa-check-timedatectl b/dsa-nagios-checks/checks/dsa-check-timedatectl index b3bc554..13956d2 100755 --- a/dsa-nagios-checks/checks/dsa-check-timedatectl +++ b/dsa-nagios-checks/checks/dsa-check-timedatectl @@ -46,7 +46,7 @@ if [ "$d" -lt "-$MAX" ] || fi -bool=$(sed '/NTP enabled:/ { s/^[^:]*: *//; p}; d' "$temp") +bool=$(sed '/\(NTP enabled\|Network time on\):/ { s/^[^:]*: *//; p}; d' "$temp") if [ "$bool" != "yes" ]; then echo "Warning: NTP not enabled!" exit 1