summaryrefslogtreecommitdiff
path: root/src/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-07 02:15:38 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-07 02:21:41 +0200
commit9aab5a731db87f96101c2eb5d2b15ac45c3a33c3 (patch)
tree9661391879d63ae69b036d8dac412fe23fcb3042 /src/unit.c
parent7e61bf2019c2cab4e1e21ee775bab25ef1a1bb81 (diff)
unit: don't cancel dependent jobs if a stopped daemon returned an error code
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/unit.c b/src/unit.c
index 701dbc0952..4810d2b9f4 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -1020,10 +1020,8 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
case JOB_RESTART:
case JOB_TRY_RESTART:
- if (ns == UNIT_INACTIVE)
+ if (ns == UNIT_INACTIVE || ns == UNIT_MAINTENANCE)
job_finish_and_invalidate(u->meta.job, true);
- else if (ns == UNIT_MAINTENANCE)
- job_finish_and_invalidate(u->meta.job, false);
else if (u->meta.job->state == JOB_RUNNING && ns != UNIT_DEACTIVATING) {
unexpected = true;
job_finish_and_invalidate(u->meta.job, false);