[systemd-devel] service.d/.conf files and multi-valued options
Christian Seiler
christian at iwakd.de
Fri Jan 23 05:15:30 PST 2015
Am 2015-01-23 12:21, schrieb Matthias Urlichs:
> Igor Bukanov:
>> It is not clear from the systemd.unit manual page what happens when
>> foo.service.d/bar.conf sets an option like Service/ExecStartPre that
>> can be specified multiple times. From experimenting I see that
>> *.conf
>> files supply additional values to the option and to overwrite or
>> remove already given values for the option one have to copy the
>> whole
>> file into /etc and edit it there. Is it so?
>
> Doesn't the manpage state that an empty entry clears the list?
Yes, it does, although only in the general systemd.unit(5), not in the
specific options, so maybe it's not that easy to find.
I think it would be nice to have some kind of man page that is a
tutorial as to what are the best practices to override distro service
files with your own site-specific configuration, which also includes
a couple of simple examples that cover the most common cases.
Btw. it would also be nice to have a possibility to just remove a
specific entry from a list, not to reset it completely. Probably less
for things like Exec*=, but more for After=/Before=/...
For example, if there's a unit with After=b.service c.service und as
an admin I want to not order it after c.service, I will have to first
reset the list (empty After=) and then add all the current other
units it orders after again. If an update then makes the unit also be
ordered after d.service to fix some other bug, the local setting will
override the After=d.service too...
Maybe something like 'After-=c.service'? Although that would probably
break traditional ini parsers trying to process unit files...
Christian
More information about the systemd-devel
mailing list