- Add new ntpd_config variable so that people can override it in rc.conf.

- Add default value in /etc/defaults/rc.conf.
- Add documentation bits to rc.conf(5).

Approved by:	cperciva (mentor)
MFC after:	1 week
This commit is contained in:
flz 2006-04-18 15:02:24 +00:00
parent 7a0948ca69
commit b1851f7c4d
3 changed files with 16 additions and 4 deletions

View File

@ -260,6 +260,7 @@ ntpdate_program="/usr/sbin/ntpdate" # path to ntpdate, if you want a different o
ntpdate_flags="-b" # Flags to ntpdate (if enabled).
ntpd_enable="NO" # Run ntpd Network Time Protocol (or NO).
ntpd_program="/usr/sbin/ntpd" # path to ntpd, if you want a different one.
ntpd_config="/etc/ntp.conf" # ntpd(8) configuration file
ntpd_sync_on_start="NO" # Sync time on ntpd startup, even if offset is high
ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
# Flags to ntpd (if enabled).

View File

@ -15,12 +15,17 @@ rcvar=`set_rcvar`
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
start_precmd="ntpd_precmd"
required_files="/etc/ntp.conf"
load_rc_config $name
required_files="${ntpd_config}"
ntpd_precmd()
{
rc_flags="-c ${ntpd_config} ${ntpd_flags}"
if checkyesno ntpd_sync_on_start; then
rc_flags="-g ${ntpd_flags}"
rc_flags="-g $rc_flags"
fi
if [ -z "$ntpd_chrootdir" ]; then
@ -47,5 +52,4 @@ ntpd_precmd()
rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags"
}
load_rc_config $name
run_rc_command "$1"

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd April 8, 2006
.Dd April 18, 2006
.Dt RC.CONF 5
.Os
.Sh NAME
@ -1804,6 +1804,13 @@ Path to
.Xr ntpd 8
(default
.Pa /usr/sbin/ntpd ) .
.It Va ntpd_config
.Pq Vt str
Path to
.Xr ntpd 8
configuration file.
(default
.Pa /etc/ntp.conf ) .
.It Va ntpd_flags
.Pq Vt str
If