chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffd73e3
)
unit: disallow configuration of more than one on_failure dependencies if OnFailureIso...
author
Lennart Poettering
<lennart@poettering.net>
Thu, 7 Apr 2011 16:47:35 +0000
(18:47 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 7 Apr 2011 16:47:35 +0000
(18:47 +0200)
src/unit.c
patch
|
blob
|
history
diff --git
a/src/unit.c
b/src/unit.c
index e5a9623528478504c2b038e221d53adc8cf0507b..32071f21701c369b4df6bdaf793a7465704ea427 100644
(file)
--- a/
src/unit.c
+++ b/
src/unit.c
@@
-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.",
+ u->meta.id);
+
+ r = -EINVAL;
+ goto fail;
+ }
+
assert((u->meta.load_state != UNIT_MERGED) == !u->meta.merged_into);
unit_add_to_dbus_queue(unit_follow_merge(u));