]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit-serialize.c
core: add new OnSuccess= dependency type
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Apr 2021 12:36:15 +0000 (14:36 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 25 May 2021 14:03:03 +0000 (16:03 +0200)
commit294446dcb98eaa1ced5839da674c2065b1367a3a
tree2b74a1cb3ce8a0d8c8f30c4b45d2f72c0d5dc5a1
parent47cd17ead4bd773691708f3e81a7d047b5692e51
core: add new OnSuccess= dependency type

This is similar to OnFailure= but is activated whenever a unit returns
into inactive state successfully.

I was always afraid of adding this, since it effectively allows building
loops and makes our engine Turing complete, but it pretty much already
was it was just hidden.

Given that we have per-unit ratelimits as well as an event loop global
ratelimit I feel safe to add this finally, given it actually is useful.

Fixes: #13386
13 files changed:
man/org.freedesktop.systemd1.xml
man/systemd.unit.xml
src/basic/unit-def.c
src/basic/unit-def.h
src/core/dbus-unit.c
src/core/job.c
src/core/load-fragment-gperf.gperf.in
src/core/unit-dependency-atom.c
src/core/unit-dependency-atom.h
src/core/unit-serialize.c
src/core/unit.c
src/core/unit.h
test/fuzz/fuzz-unit-file/directives.service