On Tue, May 15, 2012 at 05:26:32PM +0200, Josselin Mouette wrote:
Le dimanche 13 mai 2012 à 20:00 +0200, Gergely Nagy a écrit :Not entirely true. You can override parts of the file too, without copying: include the original. This doesn't let you override everything, but for a lot of things, is good enough.And then, when the original file changes, you lose the improvements and you might even end up with a broken system. For example if a systemd unit file is updated to match a change of behavior in a daemon. Say, from now it requires a pre-exec stanza to do stuff it used to do at startup. Your modified file in /etc will not include this new stanza and your daemon is broken.
Now I am confused. I thought this was the advantage of the include function of systemd. So, your etc-configuration file has as first line „:include lib-configuration file” and then your modifications.
If a unit file is updated in /lib, you have the new stanza thanks to your include function.
Of course this can still break the daemon, because your own changes couldn’t be valid anymore.
The problem is that we seem to have three cases:- default configuration file is in /lib; if the daemon detects a file in /etc, it will read the file in /lib and then in /etc and merge the files together (which application does this?) - default configuration file is in /lib; if the daemon detects a file in /etc, it will only read the etc-file; thanks to the include support you can include the lib-file in the etc-file and only add the stanza you need (e.g. systemd) - default configuration file is in /lib; if the daemon detects a file in /etc, it will only read the etc-file; without include function you have to copy the complete lib-file to etc and edit it (e.g. udev)
I don’t think we can force one of the cases as rule via policy, so the etc-directory should contain a README (e.g. in /etc/udev/rules.d) explaining how to change the default configuration.
Shade and sweet water! Stephan -- | Stephan Seitz E-Mail: firstname.lastname@example.org | | Public Keys: http://fsing.rootsland.net/~stse/keys.html |
Description: S/MIME cryptographic signature