summaryrefslogtreecommitdiffstats
path: root/etc/periodic/daily/480.leapfile-ntpd
blob: 8429824f9b9ea6a98e1f53e7f06b15227a923d2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#
# $FreeBSD$
#

# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
    . /etc/defaults/periodic.conf
    source_periodic_confs
fi

case "$daily_ntpd_leapfile_enable" in
    [Yy][Ee][Ss])
	case "$daily_ntpd_avoid_congestion" in
    	[Yy][Ee][Ss])
	    # Avoid dogpiling
	    (sleep $(jot -r 1 0 86400); service ntpd fetch) &
	    ;;
	*)
	    service ntpd fetch
	    ;;
	esac
	;;
esac

exit $rc
OpenPOWER on IntegriCloud