File: ntpwait

package info (click to toggle)
ntp 1%3A4.2.8p15%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 32,776 kB
  • sloc: ansic: 242,968; sh: 6,859; makefile: 3,419; perl: 2,765; yacc: 1,524; python: 1,486; ruby: 817; awk: 417; sed: 47; asm: 37
file content (21 lines) | stat: -rw-r--r-- 346 bytes parent folder | download | duplicates (3)
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"