Am 2015-01-23 14:27, schrieb Lennart Poettering:
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.

Actually, it kinda says it in the specific options. From the
explanation of ExecStart=:

"...If the empty string is assigned to this option, the list of
commands to start is reset, prior assignments of this option will have
no effect..."

Oh, I didn't see that while skimming the man page. Still, I think a
tutorial manpage as I described (different ways to override distro
configuration) would be a good idea. Would you accept a patch for
something like that? If so, what should the man page be called?

And at the explanation of ExecStartPre= says the syntax is identical
to ExecStart=. So I think we are covered here.

No, sure, I don't think ExecStartPre= needs additional information,
I just didn't see the sentence in ExecStart=, sorry about that.

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...

I'd be very careful with coming up with more and more syntaxes like
this. People have also requested "+=", to append things to existing
lines.

I agree that I also don't like that syntax, but:

I think for simplicity's sake the right approach to remove parts of a
unit file is to copy it from /usr to /etc, and then modify it
there. .d/ is not the answer to everything. I am aware of course that
copying the files from /usr to /etc will also disconnect you from
new unit files added by package updates, but I guess you cannot have a
cake and eat it too...

But if I want to add something to After=/Before=/..., I can easily do
that with a drop-in just containing After=foo.service. And that's indeed
very useful, I've used that a couple of times. So for symmetry reasons,
I think the converse would also be quite useful (although I haven't
needed it that often). I don't have a good idea for the syntax just now,
but would you be opposed to at least adding 'design a syntax for this'
to the TODO list?

Christian

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to