summaryrefslogtreecommitdiff
path: root/scripts/rc/rc.d/ntpwait
blob: 891d0dbd6cb65d27c337592efc984273887d0e32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# This script, when run, runs ntp-wait if ntpd is enabled.

# PROVIDE: ntpwait

. /etc/rc.subr

name="ntpwait"
rcvar="ntpwait_enable"
start_cmd="ntpwait_start"
ntp_wait="/usr/sbin/ntp-wait"

load_rc_config "$name"

ntpwait_start() {
        if checkyesno ntpd_enable; then
                $ntp_wait -v
        fi
}

run_rc_command "$1"