chrony: improve hotplug script
authorMiroslav Lichvar <mlichvar0@gmail.com>
Fri, 30 Oct 2020 19:02:48 +0000 (20:02 +0100)
committerMiroslav Lichvar <mlichvar0@gmail.com>
Fri, 30 Oct 2020 19:02:48 +0000 (20:02 +0100)
commitb9d6d6cdd0c4353a141c4a4c27337b7734a8d352
tree7a1f2340c7afe600d43bddcf0467443b746b8188
parent1dc8c501a66ac05bea4700809ae22da9231bb951
chrony: improve hotplug script

- Use the chronyc onoffline command to update state of all sources
  per current routing configuration
- Don't ignore the "ifupdate" action
- Add NTP servers from DHCP for the interface that went up instead of
  the wan4+wan6 interfaces
- Save the servers to files loaded by the sourcedir directive to not
  lose them when chronyd is restarted, and remove them when the
  interface goes down

Signed-off-by: Miroslav Lichvar <mlichvar0@gmail.com>
net/chrony/files/chrony.conf
net/chrony/files/chrony.hotplug