target: implicitly shutdown targets on shutdown, so that they are pulled into the final transaction and may be used for synchronization

This commit is contained in:
Lennart Poettering
2010-09-03 01:42:57 +02:00
parent 7f97f0fee4
commit b401e1fb9d
5 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -75,7 +75,8 @@ static int target_add_default_dependencies(Target *t) {
if ((r = unit_add_dependency(UNIT(t), UNIT_AFTER, other, true)) < 0)
return r;
return 0;
/* Make sure targets are unloaded on shutdown */
return unit_add_dependency_by_name(UNIT(t), UNIT_CONFLICTED_BY, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
static int target_add_getty_dependencies(Target *t) {