Re: init script config files
* "Christopher" == Christopher W Curtis <email@example.com> wrote:
Christopher> Every initscript that uses defaults.d (config.d -
Christopher> whatever) does *not* need to be a conffile. And should
Christopher> not be. Why? Because anything that can be configurable
Christopher> belongs in the configuration file, not in the script. If
Christopher> a script can't put everything in there, then it must be,
This won't work.
If a script uses this defaults.d thing and therefore is not marked as
a conffile, the changes possible to the process of
starting/stoping/reloading a daemon are limited to the things the
developer can think of (and to what he can code).
You can not foresee any possible change someone wants to make, and
furthermore, the more possible customisation you implement, the more
complicated this initscript will be.
So I would have to somehow disable this script and use a rewritten one
with a different name. Now you have two scripts in
/etc/init.d. foo-daemon and foo-damon-my_version, of which only the
later is really used.
Also, I oppose the idea, that part of the scripts in /etc/init.d are
conffiles and part of them are not. I want consistency and a plain
simple scheme (the current one is "init scripts are located in
/etc/init.d and are conffiles. Period.").
Christopher> You can think of it like that if you wish, but I'd like
Christopher> to think of it more like "instead of compiling all of
Christopher> these options directly into the executable, why don't we
Christopher> stick them in an external file so it's easier for users
Christopher> to modify".
Let's look at a init.d file.
# Start the proftpd FTP daemon.
# For more exhaustive logging, try "-d 3" as proftpd_options.
Why would it be easier for the admin to modify these two values in an
external file instead of the init script? You make this statement, but
what do you have prove for it?
IMHO, leaving them in the init.d script makes more sense. To see what
effect they have on the code, I just scroll down. I don't have to open
another file. I don't see what I gain if they are in another file.
Christopher> Either way - if the script uses defaults.d and everything
Christopher> you need to do can be done from there, there's no need to
Christopher> modify the initscript.
This ("and everything you need to do can be done from there") is an
constraint, that I don't see met. You can never say "oh, nobody will
ever want to change this script".