xref: /freebsd/contrib/ntp/scripts/rc/rc.d/ntpwait (revision 416ba5c74546f32a993436a99516d35008e9f384)
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