]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - etc/periodic/daily/480.status-ntpd
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / etc / periodic / daily / 480.status-ntpd
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # If there is a global system configuration file, suck it in.
7 #
8 if [ -r /etc/defaults/periodic.conf ]
9 then
10     . /etc/defaults/periodic.conf
11     source_periodic_confs
12 fi
13
14 rc=0
15
16 case "$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         ;;
26 esac
27
28 exit $rc