diff --git a/etc/rc.d/ntpd b/etc/rc.d/ntpd index 2cf519d9b5e4..a0cb54362541 100755 --- a/etc/rc.d/ntpd +++ b/etc/rc.d/ntpd @@ -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 }