xref: /freebsd/contrib/ntp/scripts/rc/rc.d/ntpwait (revision 342bcb12328e23c22789253504c5664cfece4a9b)
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
8name="ntpwait"
9rcvar="ntpwait_enable"
10start_cmd="ntpwait_start"
11ntp_wait="/usr/sbin/ntp-wait"
12
13load_rc_config "$name"
14
15ntpwait_start() {
16        if checkyesno ntpd_enable; then
17                $ntp_wait -v
18        fi
19}
20
21run_rc_command "$1"
22