aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2023-12-03 07:00:32 +0000
committerPhilip Paeps <philip@FreeBSD.org>2024-02-14 06:19:01 +0000
commita3b7bafd2acc4ddfba18c8ad990b29c407892ed6 (patch)
tree3ba14ee40f709b5936017a913e1bdabd1e010bd9
parent9d0e3b306e38adf94dc4f66a3e18b8deaf616917 (diff)
periodic/daily/480.leapfile-ntpd: only attempt to refresh leap-seconds.list
when ntpd is enabled. The leap-seconds.list is used exclusively by ntpd, therefore, do not bother to perform the fetch when ntpd is not enabled. PR: conf/275419 Reviewed by: cy, michaelo, imp Differential Revision: https://reviews.freebsd.org/D42875 (cherry picked from commit 3b3195f6767b39eb33b3523134ef988931c9c86d) (cherry picked from commit 52369c5d29f5f291bfc98270cf13768633abe322) Security: FreeBSD-EN-24:01.tzdata Approved by: so (gordon)
-rwxr-xr-xusr.sbin/periodic/etc/daily/480.leapfile-ntpd4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/periodic/etc/daily/480.leapfile-ntpd b/usr.sbin/periodic/etc/daily/480.leapfile-ntpd
index 17db53e625f8..c7de845ea87d 100755
--- a/usr.sbin/periodic/etc/daily/480.leapfile-ntpd
+++ b/usr.sbin/periodic/etc/daily/480.leapfile-ntpd
@@ -12,9 +12,9 @@ fi
case "$daily_ntpd_leapfile_enable" in
[Yy][Ee][Ss])
- if service ntpd oneneedfetch; then
+ if service ntpd enabled && service ntpd needfetch; then
anticongestion
- service ntpd onefetch
+ service ntpd fetch
fi
;;
esac