Date: Thu, 25 Aug 2016 13:24:11 +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: r304802 - head/etc/rc.d Message-ID: <201608251324.u7PDOBfO083221@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Thu Aug 25 13:24:11 2016 New Revision: 304802 URL: https://svnweb.freebsd.org/changeset/base/304802 Log: Remove the gratuitous check for $FreeBSD$ and rename the function to ntpd_init_leapfile, to ensure a copy exists in /var/db if a copy isn't already there. Reported by: ache@ MFC after: 1 day Modified: head/etc/rc.d/ntpd Modified: head/etc/rc.d/ntpd ============================================================================== --- head/etc/rc.d/ntpd Thu Aug 25 12:42:41 2016 (r304801) +++ head/etc/rc.d/ntpd Thu Aug 25 13:24:11 2016 (r304802) @@ -29,7 +29,7 @@ ntpd_precmd() rc_flags="-g $rc_flags" fi - ntpd_valid_leapfile + ntpd_init_leapfile if [ ! -f $ntp_db_leapfile ]; then ntpd_fetch_leapfile @@ -80,15 +80,12 @@ get_ntp_leapfile_expiry() { '^\([1-9][0-9]*\)$' \| 0 } -ntpd_valid_leapfile() { +ntpd_init_leapfile() { # 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. - if [ -f $ntp_db_leapfile ]; then - grep -q '\$FreeBSD.*\$' $ntp_db_leapfile && - cp -p $ntp_src_leapfile $ntp_db_leapfile - else + if [ ! -f $ntp_db_leapfile ]; then cp -p $ntp_src_leapfile $ntp_db_leapfile fi }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608251324.u7PDOBfO083221>