]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/scripts/rc/rc.d/ntpwait
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / ntp / scripts / rc / rc.d / ntpwait
1 #!/bin/sh
2 # This script, when run, runs ntp-wait if ntpd is enabled.
3
4 # PROVIDE: ntpwait
5
6 . /etc/rc.subr
7
8 name="ntpwait"
9 rcvar="ntpwait_enable"
10 start_cmd="ntpwait_start"
11 ntp_wait="/usr/sbin/ntp-wait"
12
13 load_rc_config "$name"
14
15 ntpwait_start() {
16         if checkyesno ntpd_enable; then
17                 $ntp_wait -v
18         fi
19 }
20
21 run_rc_command "$1"