summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2016-05-28 03:33:06 +0000
committercy <cy@FreeBSD.org>2016-05-28 03:33:06 +0000
commit7c96bdb9c8a1295e7cd4f855d10ea5dffe1085ec (patch)
treed79a2e7efa7bc869bda132e3645707f743c7798e
parent4d757f765535fe45ddfcedbf0534d8559173870d (diff)
downloadFreeBSD-src-7c96bdb9c8a1295e7cd4f855d10ea5dffe1085ec.zip
FreeBSD-src-7c96bdb9c8a1295e7cd4f855d10ea5dffe1085ec.tar.gz
MFC r300638:
Use the expiry date to determine whether to replace the DB copy of leapfile instead of using the leapfile serial number (create timestamp). PR: 209577
-rwxr-xr-xetc/rc.d/ntpd4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.d/ntpd b/etc/rc.d/ntpd
index fe2fc4b..91785b3 100755
--- a/etc/rc.d/ntpd
+++ b/etc/rc.d/ntpd
@@ -107,8 +107,8 @@ ntpd_fetch_leapfile() {
$verbose fetching $url
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
+ ntp_expiry_tmp=$(get_ntp_leapfile_expiry $ntp_tmp_leapfile)
+ if [ "$ntp_expiry_tmp" -gt "$ntp_leap_expiry" ]; then
$verbose using $url as $ntp_db_leapfile
mv $ntp_tmp_leapfile $ntp_db_leapfile
else
OpenPOWER on IntegriCloud