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
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D42875
This commit is contained in:
Xin LI 2023-12-02 23:00:32 -08:00
parent 06c083f79d
commit 3b3195f676
1 changed files with 2 additions and 2 deletions

View File

@ -12,9 +12,9 @@ fi
case "$daily_ntpd_leapfile_enable" in case "$daily_ntpd_leapfile_enable" in
[Yy][Ee][Ss]) [Yy][Ee][Ss])
if service ntpd oneneedfetch; then if service ntpd enabled && service ntpd needfetch; then
anticongestion anticongestion
service ntpd onefetch service ntpd fetch
fi fi
;; ;;
esac esac