]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - etc/periodic/daily/480.leapfile-ntpd
MFC r301102:
[FreeBSD/stable/10.git] / etc / periodic / daily / 480.leapfile-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 case "$daily_ntpd_leapfile_enable" in
15     [Yy][Ee][Ss])
16         case "$daily_ntpd_avoid_congestion" in
17         [Yy][Ee][Ss])
18             # Avoid dogpiling
19             (sleep $(jot -r 1 0 86400); service ntpd onefetch) &
20             ;;
21         *)
22             service ntpd onefetch
23             ;;
24         esac
25         ;;
26 esac
27
28 exit $rc