[systemd-devel] Condition* options linked by AND if stated more than once

Lennart Poettering lennart at poettering.net
Mon Aug 11 04:01:48 PDT 2014


On Thu, 07.08.14 15:09, Peter Mattern (matternp at arcor.de) wrote:

> 
> First, thank you very much for your quick responses.
> 
> I had missed the description in man systemd.unit ("If any of these
> options is assigned the empty string, ..." at the end of the
> paragraph about Condition*, right?) and a snippet as posted by
> Michal works (I had already checked this myself but not posted back
> yet).
> So sorry for the noise.
> 
> What seems odd to me is that all Config* options of a unit in /usr
> have to appear in the snippet in /etc if it's intended to change
> only a part of them but leave the others unmodified. But this is for
> a reason, I guess?

Config*? Do you mean Condition*?

Yeah, the current behaviour is that we flush out all conditions, and I
think this is the right thing to do to keep things simple: if you want
to alter the condition something is started on, you shoiuld really be
able to do that and change them fully.

Or to turn this around: if we wanted to allow changing only specific
conditions we'd have to introduce a language that allows to indicate
which of the conditions from /usr to precisely replace by which new
condition. But such a language addition sounds awfully complex,
certainly much more so thatn just allowing a single condition list reset
and asking users to then list the full condition set anew...

And generally I have the suspicion that people, if they want to change
conditions, probably want to change them fully, rather than just pick
one line of it and replace it by something else...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list