X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjob.c;h=8a74f8b614237d2c8d44f58a1ea37f40cd3eeb53;hb=70f12d37087721089a150fad985f0dca0f8af277;hp=c219b0d18ba926fb5c1871a3871306c0e7af3f2c;hpb=76bf48b7d09b6e22d1952ac2fa07fec8ee501b76;p=elogind.git diff --git a/src/job.c b/src/job.c index c219b0d18..8a74f8b61 100644 --- a/src/job.c +++ b/src/job.c @@ -489,7 +489,7 @@ int job_finish_and_invalidate(Job *j, bool success) { t = j->type; job_free(j); - if (!success) + if (!success && j->type == JOB_START) unit_status_printf(u, "Starting %s " ANSI_HIGHLIGHT_ON "failed" ANSI_HIGHLIGHT_OFF ".\n", unit_description(u)); /* Fail depending jobs on failure */ @@ -500,16 +500,14 @@ int job_finish_and_invalidate(Job *j, bool success) { t == JOB_RELOAD_OR_START) { SET_FOREACH(other, u->meta.dependencies[UNIT_REQUIRED_BY], i) - if (!other->meta.ignore_dependency_failure && - other->meta.job && + if (other->meta.job && (other->meta.job->type == JOB_START || other->meta.job->type == JOB_VERIFY_ACTIVE || other->meta.job->type == JOB_RELOAD_OR_START)) job_finish_and_invalidate(other->meta.job, false); SET_FOREACH(other, u->meta.dependencies[UNIT_REQUIRED_BY_OVERRIDABLE], i) - if (!other->meta.ignore_dependency_failure && - other->meta.job && + if (other->meta.job && !other->meta.job->override && (other->meta.job->type == JOB_START || other->meta.job->type == JOB_VERIFY_ACTIVE || @@ -519,16 +517,7 @@ int job_finish_and_invalidate(Job *j, bool success) { } else if (t == JOB_STOP) { SET_FOREACH(other, u->meta.dependencies[UNIT_CONFLICTS], i) - if (!other->meta.ignore_dependency_failure && - other->meta.job && - (other->meta.job->type == JOB_START || - other->meta.job->type == JOB_VERIFY_ACTIVE || - other->meta.job->type == JOB_RELOAD_OR_START)) - job_finish_and_invalidate(other->meta.job, false); - - SET_FOREACH(other, u->meta.dependencies[UNIT_CONFLICTED_BY], i) - if (!other->meta.ignore_dependency_failure && - other->meta.job && + if (other->meta.job && (other->meta.job->type == JOB_START || other->meta.job->type == JOB_VERIFY_ACTIVE || other->meta.job->type == JOB_RELOAD_OR_START))