Request for design critique - configuration directories

Achim Gratz Stromeko at nexgo.de
Fri Mar 24 19:13:21 UTC 2017


Eric S. Raymond writes:
> No. That would gratuitously break compatibility with no-refclock
> installations that already have a working ntp.conf (or have one
> generated by dhcp).  There's no reason not to just let that case keep
> working.

Again, all the standard invocations that distributions known to me do
already include the option pointing to the config file.  Anyone not
using what's delivered with their distribution should be more than
capable of either providing that switch pointing to the right file or go
with the flow and move the configuration into /etc/ntp.d as appropriate.

> My model here is the way apache2 config snippets work.  What's your
> actual issue with it?

My issue is that every single one of those config directories works
slightly different and you're proposing yet another gratuitous addition
to this already cluttered landscape.

Besides, I really think it's cleaner and more easily followed to just
run through all config files in a directory (in lexical order if you
must) without regard to the file name, a prefix or a suffix.  For a
packager it makes no difference if they rename a file or (sym)link to a
file in som other directory.  That structure also makes it really easy
to keep several configurations at hand, you just have to rename the
directories to swap from one to the other.  So following the example of
fontconfig you'd have:

/etc/ntp.d/
/etc/ntp.d/ntpd/
/etc/ntp.d/refclkd/
/etc/ntp.d/ntpd.avail
/etc/ntp.d/refclkd.avail

with all config snippets dropped into the *.avail directories and the
active ones linked into the respective non-suffixed ones, like that:

/etc/ntp.d/ntpd.avail/snippet1
/etc/ntp.d/ntpd.avail/snippet2
/etc/ntp.d/ntpd.avail/snippet3
/etc/ntp.d/ntpd/active1 -> ../ntpd.avail/snippet3
/etc/ntp.d/ntpd/snippet1 -> ../ntpd.avail/snippet1

(I've shown a configuration where one config is renamed to reorder the
appearance, although typically you would just link onto the same name.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada



More information about the devel mailing list