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
MFC after:	3 days
This commit is contained in:
Cy Schubert 2016-05-25 01:35:02 +00:00
parent 0e9f21dc24
commit 3f9e9f234e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300638

View File

@ -108,8 +108,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