1 1.1 christos #!/bin/sh 2 1.1 christos # This script, when run, runs ntp-wait if ntpd is enabled. 3 1.1 christos 4 1.1 christos # PROVIDE: ntpwait 5 1.1 christos 6 1.1 christos . /etc/rc.subr 7 1.1 christos 8 1.1 christos name="ntpwait" 9 1.1 christos rcvar="ntpwait_enable" 10 1.1 christos start_cmd="ntpwait_start" 11 1.1 christos ntp_wait="/usr/sbin/ntp-wait" 12 1.1 christos 13 1.1 christos load_rc_config "$name" 14 1.1 christos 15 1.1 christos ntpwait_start() { 16 1.1 christos if checkyesno ntpd_enable; then 17 1.1 christos $ntp_wait -v 18 1.1 christos fi 19 1.1 christos } 20 1.1 christos 21 1.1 christos run_rc_command "$1" 22