Date: Thu, 25 Aug 2016 02:58:41 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304781 - head/etc/rc.d Message-ID: <201608250258.u7P2wfLm045991@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Thu Aug 25 02:58:41 2016 New Revision: 304781 URL: https://svnweb.freebsd.org/changeset/base/304781 Log: Add logic to replace the working ntp leap-seconds file in /var/db if it contains a $FreeBSD$ header. The header will cause the file to fail checksum of the hash causing ntpd to ignore the file. MFC after: 1 day Modified: head/etc/rc.d/ntpd Modified: head/etc/rc.d/ntpd ============================================================================== --- head/etc/rc.d/ntpd Thu Aug 25 02:45:52 2016 (r304780) +++ head/etc/rc.d/ntpd Thu Aug 25 02:58:41 2016 (r304781) @@ -87,6 +87,13 @@ ntpd_fetch_leapfile() { verbose=: fi + # Refresh working leapfile with an invalid hash due to + # FreeBSD id header. Ntpd will ignore leapfiles with a + # mismatch hash. The file must be the virgin file from + # the source. + test -f $ntp_db_leapfile && + grep -q '\$FreeBSD.*\$' $ntp_db_leapfile && + cp -p $ntp_src_leapfile $ntp_db_leapfile ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" ntp_ver_no_src=$(get_ntp_leapfile_ver $ntp_src_leapfile)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608250258.u7P2wfLm045991>