diff options
Diffstat (limited to 'libexec/rc/rc.d/ntpd')
-rwxr-xr-x | libexec/rc/rc.d/ntpd | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libexec/rc/rc.d/ntpd b/libexec/rc/rc.d/ntpd index c1d2f52a01b7..76d83149ae1a 100755 --- a/libexec/rc/rc.d/ntpd +++ b/libexec/rc/rc.d/ntpd @@ -1,12 +1,11 @@ #!/bin/sh # -# $FreeBSD$ # # PROVIDE: ntpd # REQUIRE: DAEMON ntpdate FILESYSTEMS devfs # BEFORE: LOGIN -# KEYWORD: nojail shutdown +# KEYWORD: nojail resume shutdown . /etc/rc.subr @@ -14,9 +13,10 @@ name="ntpd" desc="Network Time Protocol daemon" rcvar="ntpd_enable" command="/usr/sbin/${name}" -extra_commands="fetch needfetch" +extra_commands="fetch needfetch resume" fetch_cmd="ntpd_fetch_leapfile" needfetch_cmd="ntpd_needfetch_leapfile" +resume_cmd="ntpd_resume" start_precmd="ntpd_precmd" _ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" @@ -59,7 +59,7 @@ can_run_nonroot() local fileopts="^[ \t]*crypto|^[ \t]*driftfile|^[ \t]*key|^[ \t]*logfile|^[ \t]*statsdir" grep -E -q "${fileopts}" "${ntpd_config}" && return 1 - # Try to set up the the MAC ntpd policy so ntpd can run with reduced + # Try to set up the MAC ntpd policy so ntpd can run with reduced # privileges. Detect whether MAC is compiled into the kernel, load # the policy module if not already present, then check whether the # policy has been disabled via tunable or sysctl. @@ -239,4 +239,9 @@ ntpd_fetch_leapfile() { fi } +ntpd_resume() +{ + run_rc_command restart +} + run_rc_command "$1" |