manager: when two pending jobs conflict, keep the one that "conflicts", remove the one that is "conflicted"

This gives the writer of units control which unit is kept and which is
stopped when two units conflict.
This commit is contained in:
Lennart Poettering
2010-08-09 22:32:30 +02:00
parent 6e98720f14
commit 69dd2852bb
17 changed files with 161 additions and 41 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ static int socket_add_default_dependencies(Socket *s) {
if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0)
return r;
return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTED_BY, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
static int socket_load(Unit *u) {