summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2016-01-27 02:25:25 +0000
committercy <cy@FreeBSD.org>2016-01-27 02:25:25 +0000
commit0ccc3c81eb84e02cc75d71eed8f734f3f9da961e (patch)
treecbf1f5b828416eebc3972150228b1a77ccfd0924 /etc
parent31bb8ee5bdf9a6332a86e4774ebdccba877ce42e (diff)
downloadFreeBSD-src-0ccc3c81eb84e02cc75d71eed8f734f3f9da961e.zip
FreeBSD-src-0ccc3c81eb84e02cc75d71eed8f734f3f9da961e.tar.gz
Allow specification of fetch options for ntp leap-seconds fetch.
MFC after: 1 week X-MFC with: r289421, r293037, r294773
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf2
-rwxr-xr-xetc/rc.d/ntpd2
2 files changed, 3 insertions, 1 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 380f0d3..a674acb 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -368,6 +368,8 @@ ntp_db_leapfile="/var/db/ntpd.leap-seconds.list"
# Working copy (updated weekly) leapfile
ntp_leapfile_sources="https://www.ietf.org/timezones/data/leap-seconds.list"
# Source from which to fetch leapfile
+ntp_leapfile_fetch_opts="-mq" # Options to use for ntp leapfile fetch,
+ # e.g. --no-verify-peer
ntp_leapfile_expiry_days=30 # Check for new leapfile 30 days prior to
# expiry.
ntp_leapfile_fetch_verbose="NO" # Be verbose during NTP leapfile fetch
diff --git a/etc/rc.d/ntpd b/etc/rc.d/ntpd
index f014110..7f28358 100755
--- a/etc/rc.d/ntpd
+++ b/etc/rc.d/ntpd
@@ -105,7 +105,7 @@ ntpd_fetch_leapfile() {
$verbose Within ntp leapfile expiry limit, initiating fetch
for url in $ntp_leapfile_sources ; do
$verbose fetching $url
- fetch -mqo $ntp_tmp_leapfile $url && break
+ fetch $ntp_leapfile_fetch_opts -o $ntp_tmp_leapfile $url && break
done
ntp_ver_no_tmp=$(get_ntp_leapfile_ver $ntp_tmp_leapfile)
if [ "$ntp_ver_no_tmp" -gt "$ntp_ver_no_db" ]; then
OpenPOWER on IntegriCloud