summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-08 00:28:04 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-08 00:28:04 +0200
commit9c2d9caab23286f3d8dceaaa43ab46e29e3579fb (patch)
tree8d2de8dac8145a94b8badb6394d5e67136b77aed
parent46d95c0fe087a9a4475cae5430e9b33f6c46ff25 (diff)
job: when converting restart jobs, move them to WAITING state
-rw-r--r--src/job.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/job.c b/src/job.c
index 0a9ce153f6..7cbde80b38 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,13 +470,15 @@ 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;