summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/defaults/rc.conf2
-rwxr-xr-xetc/rc.d/ntpdate4
-rw-r--r--share/man/man5/rc.conf.510
3 files changed, 12 insertions, 4 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 02526b3..1bd2af7 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -261,6 +261,8 @@ timed_flags="" # Flags to timed (if enabled).
ntpdate_enable="NO" # Run ntpdate to sync time on boot (or NO).
ntpdate_program="/usr/sbin/ntpdate" # path to ntpdate, if you want a different one.
ntpdate_flags="-b" # Flags to ntpdate (if enabled).
+ntpdate_config="/etc/ntp.conf" # ntpdate(8) configuration file
+ntpdate_hosts="" # Whitespace-separated list of ntpdate(8) servers.
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
diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate
index 84c4734..c76f7a0 100755
--- a/etc/rc.d/ntpdate
+++ b/etc/rc.d/ntpdate
@@ -16,11 +16,11 @@ start_cmd="ntpdate_start"
ntpdate_start()
{
- if [ -z "$ntpdate_hosts" -a -f /etc/ntp.conf ]; then
+ if [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then
ntpdate_hosts=`awk '
/^server[ \t]*127.127/ {next}
/^(server|peer)/ {print $2}
- ' </etc/ntp.conf`
+ ' < ${ntpdate_config}`
fi
if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then
echo "Setting date via ntp."
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index 5ea091b..59b5637 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 29, 2006
+.Dd Jul 20, 2006
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -1770,11 +1770,17 @@ An option to set this up initially
(from a list of known servers) is also provided by the
.Xr sysinstall 8
program when the system is first installed.
+.It Va ntpdate_config
+Configuration file for
+.Xr ntpdate 8 .
+.Pq Vt str
+(default
+.Pa /etc/ntp.conf ).
.It Va ntpdate_hosts
.Pq Vt str
A whitespace-separated list of NTP servers to synchronize with at startup.
The default is to use the servers listed in
-.Pa /etc/ntp.conf ,
+.Va ntpdate_config ,
if that file exists.
.It Va ntpdate_program
.Pq Vt str
OpenPOWER on IntegriCloud