diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2016-08-25 13:24:11 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2016-08-25 13:24:11 +0000 |
| commit | eb27c4c0e9a8c27bcdc192f5d78d45986f05241e (patch) | |
| tree | 642464ad3e2e935f8b9ab10608fe5a3cb41b7d05 /etc | |
| parent | ef63b26a5fc42173e4af8739d339d5f1e6efc9b7 (diff) | |
Notes
Diffstat (limited to 'etc')
| -rwxr-xr-x | etc/rc.d/ntpd | 9 |
1 files changed, 3 insertions, 6 deletions
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 } |
