summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-03 01:42:19 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-03 01:42:57 +0200
commitb401e1fb9df7ea8b0fd26e16d886056a5ae7c5d9 (patch)
tree609ee3f33898262c424aad11f58ca6e855222ca0 /src
parent7f97f0fee46ae167c27c5be21ee0caddacbc6bf9 (diff)
target: implicitly shutdown targets on shutdown, so that they are pulled into the final transaction and may be used for synchronization
Diffstat (limited to 'src')
-rw-r--r--src/target.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/target.c b/src/target.c
index c350d8fa19..1118693a39 100644
--- a/src/target.c
+++ b/src/target.c
@@ -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) {