[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Zutils-bug] Location of zutilsrc
From: |
Daniel Baumann |
Subject: |
Re: [Zutils-bug] Location of zutilsrc |
Date: |
Tue, 29 Nov 2022 18:04:46 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 |
Hi Antonio
On 11/29/22 17:49, Antonio Diaz Diaz wrote:
>> Specially ~/.config/zutils or ~/.config/zutils.conf would be fine.
>
> I prefer the .conf extension.
yes; config files should have the .conf extension; only if you'd have
the .config/zutils directory to put them into (with .conf extension).
>> and having conf.d support (i.e. /etc/foo.conf.d/*.conf) would be nice
>> too.
>
> I don't understand this one. Zutils uses just one configuration file in
> /etc. What is the advantage of putting it in
> /etc/zutils.conf.d/zutils.conf?
old-school config handling requires manipulating one file,
e.g. /etc/ssh/ssh_config.
when doing configuration management, then that is very unfortunate
design (thus unrelated of the implementation of the configuration
management, be it homegrown or any of ansible/puppet/chef/$whatever...),
because the file has to be parsed and edited - which inevitably always
leads to problems over time, no matter how "good" the parser for a
specific conffile is (be it comments added, local changes, or just the
fact that the package management (dpkg/rpm) treat it as "modified" and
thus will prompt for it on upgrades).
the way to fix this completely is to allow to drop "snippets" of config
files into a directory, which then are read lexicographically sorted.
e.g. having "PasswordAuthentication yes" in /etc/ssh/ssh_config gets
overwritten by /etc/ssh/ssh_config.d/10-disable-password-login.conf
(which contains "PasswordAuthentication no").
Configuration management then can just put an updated
10-disable-password-login.conf on the system, or remove it when it's no
more desired/needed. No more hassle needed :)
This is how and why a lot of software has added support for so-called
"conf.d handling" in the last ~15 years (ssh being one of the famous
packages that has done it only just quite recently, though).
Regards,
Daniel