Re: [chrony-users] Pool vs. server without config parsing

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


I'd still think the easiest would be:
- find all server and pool lines in the chrony.conf file and move them to files in
/etc/chrony/sources.d/*.sources files (one source per file or all in one file,
depending on your preferences)
- add a "sourcedir /etc/chrony/sources.d" to chrony.conf when it isn't already there
- let your API update only the .sources files in /etc/chrony/sources.d

That way you don't have to worry about other config lines and you can focus
on the server and pool lines.  The above can likely be done with just simple text
tools like grep and sed, no real parsing required.  And once you have done the
initial conversion you do no longer need to look at the chrony.conf file.

Rob

On 2024-06-24 14:48, Josef 'Jeff' Sipek wrote:
So, we're starting with an "unknown" config for chrony (it could have a
variety of tweaks, but 99.99999% chance it is just server/pool lines) and
the new API way needs to behave properly when updating the bespoke config.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/