From owner-svn-src-head@freebsd.org Wed May 25 01:35:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C59DEB4949E; Wed, 25 May 2016 01:35:03 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85F911A3A; Wed, 25 May 2016 01:35:03 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4P1Z2wS017293; Wed, 25 May 2016 01:35:02 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4P1Z2eE017292; Wed, 25 May 2016 01:35:02 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201605250135.u4P1Z2eE017292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 25 May 2016 01:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300638 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2016 01:35:03 -0000 Author: cy Date: Wed May 25 01:35:02 2016 New Revision: 300638 URL: https://svnweb.freebsd.org/changeset/base/300638 Log: 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 Modified: head/etc/rc.d/ntpd Modified: head/etc/rc.d/ntpd ============================================================================== --- head/etc/rc.d/ntpd Wed May 25 01:23:19 2016 (r300637) +++ head/etc/rc.d/ntpd Wed May 25 01:35:02 2016 (r300638) @@ -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