On 12/09/12 at 05:23pm, Dimitrios Apostolou wrote:
On Sat, 8 Dec 2012, Curtis Shimamoto wrote:
On 12/09/12 at 04:01am, Dimitrios Apostolou wrote:
Imagine that in /usr unit file the daemon is being called as "binary -d". So I create the /etc unit file that supersedes it and calls it as "blah -d -n1". Then the package gets updated and the /usr unit file changes to "binary -d --lock=/whatever/path".
As you can see I won't get the update because I've overriden the unit file, I won't get any warning either, but if the original unit file called "binary -d --lock=/whatever/path $BLAH_ARGS" there would have been no such problem.
Keep some kind of configuration fine and use the .include feature of systemd units to source the config with EnvironmentFile=.
Hi Curtis, I can't see how the .include directive would help in the case I mentioned. But even in other cases that it helps, I think it's a much more heavyweight solution to the problem, than the /etc/conf.d EnvironmentFile. What do you think?
Dimitris
Yeah, I wrote back shortly after I sent that mentioning that it really wouldn't work, after I had thought it through a bit. I am not sure what you mean by heavyweight solution. If what you mean is that is will have to check for and then source a secondary file of the same name, I really don't think this would matter as it only has to do it once. Also, this seems like it is probably nearly the same amount of work for the system as sourcing a configuration file. Could you explain what you mean by heavyweight? I do agree with the fact that things should move towards following upstream, and the use of conf.d specifically should be deprecated. That doesn't necessarily mean that I think that you, the user, should not be able to create a config file on your own to source and use in the service. Personally, I have only made use of the .include feature once, and for something very simple. This issue of yours has made me think that it might be neat if there was a service variable to append to the ExecStart line. Thus making the .include feature more robust, as you could add to instead of replacing the actual command. -- Curtis Shimamoto sugar.and.scruffy@gmail.com