|Summary:||rc.d/ntpd cannot fetch NTPD leap-seconds file via a proxy|
|Product:||Base System||Reporter:||Boris Korzun <drtr0jan>|
|Component:||bin||Assignee:||freebsd-bugs (Nobody) <bugs>|
|Severity:||Affects Some People||CC:||mail, peterpramb|
Description Boris Korzun 2019-05-20 12:25:14 UTC
The ntpd script supports ntpd_env option (and ntpd_env_file in 12.0-STABLE). But ntpd_fetch_leapfile() subroutine doesn't support ntpd_env option. So it's impossible to fetch the leapfile via a proxy (HTTP_PROXY variable for the fetch).
Comment 1 mail 2020-02-19 13:35:14 UTC
(In reply to Boris Korzun from comment #0) Hi Boris, Were you ever able to fix this "nicely"? We have a couple of FreeBSD 12.1 hosts that rely on a proxy for their internet access. They suffer from this issue as well. Kind regards, Ruben
Comment 2 Peter Pramberger 2020-10-16 08:59:50 UTC
The workaround mentioned in https://forums.freebsd.org/threads/set-proxy-server-for-rc-d-periodic-scripts.69664/post-418020 was a good starting point, but unfortunately I was not able to get 'ntpd_env' working. There is however 'ntpd_env_file' (at least in 12) to source external files, which works perfectly: /etc/rc.conf: ntpd_env_file="/etc/profile.d/proxy.sh" /etc/profile.d/proxy.sh: http_proxy="http://my.proxy:8080" export http_proxy Just make sure that the referenced file is readable, and usable by sh(1). Would prefer a more generic way though, instead of changing the environment for every service needing external access.