I have a few questions:

1. What is your use case for ntpdig and/or ntpdate (please be specific which) if not for the hooks? Note that ntpdate is a wrapper script around ntpdig that upstream does not install by default. And then there's ntpdate-debian wrapping ntpdate.

2. My recollection is that there was some talk about removing ntpdate from Debian's src:ntp. I don't know if that's already happened.

I ended up implementing all that in Debian's src:ntpsec for compatibility with ntp, but I intended on removing it once ntp did.

The network hooks do a couple of different things. First, if you're using ifupdown, then when an interface comes up, ntpsec is stopped, ntpdate is run, and ntpsec is started. This is arguably* desirable if the system is not always connected to the Internet. If you're running both ntpsec and these hooks (why?), this is harmful if interfaces come and go while the system remains connected to the Internet. Off the top of my head, I can't remember whether this behavior happens with NetworkManager or networkd.

The hooks also take the NTP server(s) given by the DHCP server and write them to a configuration file to be used by ntpdate/ntpsec. I believe this works with dhclient, NetworkManager, and networkd.

* But why not either: A) run systemd-timesyncd (the default anyway) or B) just run ntpsec and let it figure out when the network is up (which it's probably "good enough" at).

Is any of this a use case you care about?

3. The DHCP bit can be turned off in /etc/default/ntpsec-ntpdate. Disabling running ntpdate on ifup would require deleting the hook script.

--
Richard

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to