From effe32e023a31c74f7eec97405fd06262780c378 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 23 Jan 2017 13:41:57 +0100 Subject: [PATCH] dsa-check-timedatectl: Accept "Network time on" string also instead of just "NTP enabled" (stretch vs. jessie?) --- 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 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 -- 2.20.1