480.status-ntpd revision 169517
1#!/bin/sh
2#
3# $FreeBSD: head/etc/periodic/daily/480.status-ntpd 169517 2007-05-13 09:33:35Z maxim $
4#
5
6# If there is a global system configuration file, suck it in.
7#
8if [ -r /etc/defaults/periodic.conf ]
9then
10    . /etc/defaults/periodic.conf
11    source_periodic_confs
12fi
13
14rc=0
15
16case "$daily_status_ntpd_enable" in
17    [Yy][Ee][Ss])
18	echo ""
19	echo "NTP status:"
20
21	synchronized=$(ntpq -p | tee /dev/stderr | grep '^\*')
22	if [ -z "$synchronized" ]; then
23		rc=1
24	fi
25	;;
26esac
27
28exit $rc
29