Commit f68319bb authored by Lennart Poettering's avatar Lennart Poettering
Browse files

unit: disallow configuration of more than one on_failure dependencies if OnFailureIsolate= is on

parent ffd73e35
......@@ -814,6 +814,16 @@ int unit_load(Unit *u) {
if ((r = unit_add_default_dependencies(u)) < 0)
goto fail;
if (u->meta.on_failure_isolate &&
set_size(u->meta.dependencies[UNIT_ON_FAILURE]) > 1) {
log_error("More than one OnFailure= dependencies specified for %s but OnFailureIsolate= enabled. Refusing.",
r = -EINVAL;
goto fail;
assert((u->meta.load_state != UNIT_MERGED) == !u->meta.merged_into);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment