Web lists-archives.com

Re: upgraded config files in /lib/systemd/system




On 03/05/17 21:29, Michael Biebl wrote:
> 
> Keep in mind, that in most cases you don't need to override the package
> provided service file completely by making a full copy of it in
> /etc/systemd/system
> 
> You can extend/override individual bits via drop-in files (e.g. adding
> additional dependencies/orderings). For a service foo.service you create
> 
> /etc/systemd/system/foo.service.d/bla.conf
> The name is arbitrary, you just need to make sure it has a .conf extension.
> 
> Fwiw, systemctl edit (--full) foo.service can help you with that
> 
> https://www.freedesktop.org/software/systemd/man/systemctl.html#edit%20NAME%E2%80%A6
> 

This is nice to have, but please remember that config options
accumulate for systemd.unit files. You still need /etc/systemd/\
system/foo.service to reliably override /lib/systemd/system/\
foo.service.

Since Debian already has a scheme to handle conflicts in
config files on an upgrade, I wonder why there is such a
high refusal to use it in this case?

If the config wasn't changed or if there are just some files in
/etc/systemd/system/foo.service.d, then this would be a noop.
But *if* there is a conflict, then the usual dialog should be
brought up, as for all other config files.

> This is new in stretch, jessie's systemctl doesn't have that yet.
> 

Focusing on Stretch or Buster is fine with me.


Regards
Harri