aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2023-12-03 07:00:32 +0000
committerXin LI <delphij@FreeBSD.org>2023-12-06 07:55:17 +0000
commit80560eec655ac6cd3b7d7fd0f9fe37f309b78d64 (patch)
treeab8370d3ed5b68b19435ff07dc5a8ab77c326353
parentb743fda10257b8381cc5461207da720dc305d20e (diff)
downloadsrc-80560eec655ac6cd3b7d7fd0f9fe37f309b78d64.tar.gz
src-80560eec655ac6cd3b7d7fd0f9fe37f309b78d64.zip
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)
-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 a693986e0dd1..f4a1edb8d5a2 100755
--- a/usr.sbin/periodic/etc/daily/480.leapfile-ntpd
+++ b/usr.sbin/periodic/etc/daily/480.leapfile-ntpd
@@ -13,9 +13,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