svn commit: r304802 - head/etc/rc.d
Cy Schubert
cy at FreeBSD.org
Thu Aug 25 13:24:12 UTC 2016
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
}
More information about the svn-src-head
mailing list