X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fjob.c;h=eaa4bb17fc1d42787613e9cb4269baeee77d209c;hb=31cf921abbeafc9dae2d5c777f3e2285e6f4c19d;hp=ef5dbce1a336af9464db91c34d77de8d39c5895a;hpb=8e07fc41f86d41e68c5663b2a3c620a0adedcc11;p=elogind.git diff --git a/src/core/job.c b/src/core/job.c index ef5dbce1a..eaa4bb17f 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -639,7 +639,7 @@ static void job_print_status_message(Unit *u, JobType t, JobResult result) { manager_flip_auto_status(u->manager, true); unit_status_printf(u, ANSI_HIGHLIGHT_RED_ON "FAILED" ANSI_HIGHLIGHT_OFF, format); - manager_status_printf(u->manager, false, NULL, + manager_status_printf(u->manager, STATUS_TYPE_NORMAL, NULL, "See \"systemctl status %s%s%s\" for details.", quotes ? "'" : "", u->id, quotes ? "'" : ""); break; @@ -858,14 +858,18 @@ finish: static int job_dispatch_timer(sd_event_source *s, uint64_t monotonic, void *userdata) { Job *j = userdata; + Unit *u; assert(j); assert(s == j->timer_event_source); - log_warning_unit(j->unit->id, "Job %s/%s timed out.", - j->unit->id, job_type_to_string(j->type)); + log_warning_unit(j->unit->id, "Job %s/%s timed out.", j->unit->id, job_type_to_string(j->type)); + u = j->unit; job_finish_and_invalidate(j, JOB_TIMEOUT, true); + + failure_action(u->manager, u->job_timeout_action, u->job_timeout_reboot_arg); + return 0; }