Request for design critique - configuration directories
Eric S. Raymond
esr at thyrsus.com
Fri Mar 24 12:20:32 UTC 2017
Gary E. Miller <gem at rellim.com>:
> Yo Eric!
>
> On Thu, 23 Mar 2017 14:16:17 -0400 (EDT)
> esr at thyrsus.com (Eric S. Raymond) wrote:
>
> > We have an open issue #204 on the tracker: Support /etc/ntp.d
>
> Good to fix pre 1.0
I've just pushed an implementation and documentation for it. It
only cost us about 70 LOC.
> > 4. Here's the tricky part. Not every file is interpreted by every
> > program. Initially, only files with the extensions ".ntpd" and
> > ".refclockd" are interpreted by ntpd. Other files are skipped.
>
> I was OK until you got here. I'm not a fan of encoding much in
> filenames. I would put things in sections, which could be in any order
> in any of the parsed file. Like this:
>
> [global]
> # options common to ntpd and refclockd could go here
> statsdir /var/log/ntpstats/
>
> [ntpd]
> # options unique to ntpd go here
> driftfile /etc/ntp.drift
> logfile /var/log/ntpd.log
>
> [refclock]
> # options unique to refclocks go here
> server 127.127.28.1 minpoll 4 maxpoll 4
> fudge 127.127.28.1 time1 0.001500 refid PPS
>
> For compatibility maybe anything not in one of those three sections
> is taken either as glocal, or legacy.
In the abstract, this would be equivalent. There are two problems with it:
1. It would require a backward-incompatible change to the configuration
syntax and significant surgery on the parser. While it is the case that I
am a yacc wizard for whom this surgery would be relatively easy, I firmly
reject inflicting the incompatibility on our users without a *much* stronger
case for tolerating the breakage than we now have.
2. The objective of this new feature is to make life easier for packagers
to write scripts that assemble snippets into working configs. For this purpose,
experience with (e.g.) Apache 2 seems to show that shuffling around files with
renames is easier and less error prone that concatenating configuration content
into product files.
You may not be fan of "encoding much in filenames", and I'm not
attached to the technique myself, but under these constraints I'm not
seeing a better alternative. Perhaps you can dream up one?
> > 5. The "other files are skipped" is a convenience for configurators,
> > which can use file renames to enable and disable configuration
> > snippets while leaving the file conyent of snippets untouched.
>
> Hmm, without the extentions this is harder. Maybe the all end in
> .ntp, or must start with a number? Then README gets skipped.
I don't understand this remark. Under the present rules README
is already skipped.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Please consider contributing to my Patreon page at https://www.patreon.com/esr
so I can keep the invisible wheels of the Internet turning. Give generously -
the civilization you save might be your own.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: not available
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170324/2807bc77/attachment.bin>
More information about the devel
mailing list