X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjob.c;h=7cbde80b38036689b3deffb8fac4b0bcad3f5a56;hb=9c2d9caab23286f3d8dceaaa43ab46e29e3579fb;hp=2199d75f6092df0a4bc232f2ca07dc8080f6c667;hpb=9e58ff9c5c3bd46a796a20fc6c304cdab489f334;p=elogind.git diff --git a/src/job.c b/src/job.c index 2199d75f6..7cbde80b3 100644 --- a/src/job.c +++ b/src/job.c @@ -461,7 +461,6 @@ int job_finish_and_invalidate(Job *j, bool success) { assert(j); assert(j->installed); - log_debug("Job %s/%s finished, success=%s", j->unit->meta.id, job_type_to_string(j->type), yes_no(success)); job_add_to_dbus_queue(j); /* Patch restart jobs so that they become normal start jobs */ @@ -471,20 +470,22 @@ int job_finish_and_invalidate(Job *j, bool success) { j->unit->meta.id, job_type_to_string(j->type), j->unit->meta.id, job_type_to_string(JOB_START)); - j->state = JOB_RUNNING; + j->state = JOB_WAITING; j->type = JOB_START; job_add_to_run_queue(j); return 0; } + log_debug("Job %s/%s finished, success=%s", j->unit->meta.id, job_type_to_string(j->type), yes_no(success)); + j->failed = !success; u = j->unit; t = j->type; job_free(j); if (!success) - unit_status_printf(u, "Starting %s... " ANSI_HIGHLIGHT_ON "failed" ANSI_HIGHLIGHT_OFF ".\n", unit_description(u)); + unit_status_printf(u, "Starting %s " ANSI_HIGHLIGHT_ON "failed" ANSI_HIGHLIGHT_OFF ".\n", unit_description(u)); /* Fail depending jobs on failure */ if (!success) {