diff options
Diffstat (limited to 'scripts/rc/rc.d/ntpwait')
-rw-r--r-- | scripts/rc/rc.d/ntpwait | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/rc/rc.d/ntpwait b/scripts/rc/rc.d/ntpwait new file mode 100644 index 0000000..891d0db --- /dev/null +++ b/scripts/rc/rc.d/ntpwait @@ -0,0 +1,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" |