summaryrefslogtreecommitdiff
path: root/src/core/load-fragment-gperf.gperf.in
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-04-14 14:36:15 +0200
committerLennart Poettering <lennart@poettering.net>2021-05-25 16:03:03 +0200
commit294446dcb98eaa1ced5839da674c2065b1367a3a (patch)
tree2b74a1cb3ce8a0d8c8f30c4b45d2f72c0d5dc5a1 /src/core/load-fragment-gperf.gperf.in
parent47cd17ead4bd773691708f3e81a7d047b5692e51 (diff)
downloadsystemd-294446dcb98eaa1ced5839da674c2065b1367a3a.tar.gz
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
Diffstat (limited to 'src/core/load-fragment-gperf.gperf.in')
-rw-r--r--src/core/load-fragment-gperf.gperf.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/load-fragment-gperf.gperf.in b/src/core/load-fragment-gperf.gperf.in
index bb3c4453df..25cd55e2f9 100644
--- a/src/core/load-fragment-gperf.gperf.in
+++ b/src/core/load-fragment-gperf.gperf.in
@@ -264,6 +264,7 @@ Unit.BindTo, config_parse_unit_deps,
Unit.Conflicts, config_parse_unit_deps, UNIT_CONFLICTS, 0
Unit.Before, config_parse_unit_deps, UNIT_BEFORE, 0
Unit.After, config_parse_unit_deps, UNIT_AFTER, 0
+Unit.OnSuccess, config_parse_unit_deps, UNIT_ON_SUCCESS, 0
Unit.OnFailure, config_parse_unit_deps, UNIT_ON_FAILURE, 0
Unit.PropagatesReloadTo, config_parse_unit_deps, UNIT_PROPAGATES_RELOAD_TO, 0
Unit.PropagateReloadTo, config_parse_unit_deps, UNIT_PROPAGATES_RELOAD_TO, 0
@@ -281,6 +282,7 @@ Unit.RefuseManualStart, config_parse_bool,
Unit.RefuseManualStop, config_parse_bool, 0, offsetof(Unit, refuse_manual_stop)
Unit.AllowIsolate, config_parse_bool, 0, offsetof(Unit, allow_isolate)
Unit.DefaultDependencies, config_parse_bool, 0, offsetof(Unit, default_dependencies)
+Unit.OnSuccessJobMode, config_parse_job_mode, 0, offsetof(Unit, on_success_job_mode)
Unit.OnFailureJobMode, config_parse_job_mode, 0, offsetof(Unit, on_failure_job_mode)
{# The following is a legacy alias name for compatibility #}
Unit.OnFailureIsolate, config_parse_job_mode_isolate, 0, offsetof(Unit, on_failure_job_mode)