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