summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-29 03:18:09 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-29 03:18:09 +0100
commitf50e0a012340fa8dfe6ec7f0cd869f5f3a052d7a (patch)
tree79ef58ce7acbc8dffcb0af8284a0f4e5922bbe88 /job.c
parentb08d03ffe58332f590aae5c78a85e4fc0b8588ce (diff)
implement coldpluggin
Diffstat (limited to 'job.c')
-rw-r--r--job.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/job.c b/job.c
index ff30864e43..148c7458b0 100644
--- a/job.c
+++ b/job.c
@@ -5,6 +5,7 @@
#include "macro.h"
#include "job.h"
+#include "log.h"
Job* job_new(Manager *m, JobType type, Unit *unit) {
Job *j;
@@ -405,10 +406,18 @@ int job_finish_and_invalidate(Job *j, bool success) {
assert(j);
assert(j->installed);
+ log_debug("Job %s/%s finished, success=%s", unit_id(j->unit), job_type_to_string(j->type), yes_no(success));
+
/* Patch restart jobs so that they become normal start jobs */
if (success && (j->type == JOB_RESTART || j->type == JOB_TRY_RESTART)) {
+
+ log_debug("Converting job %s/%s → %s/%s",
+ unit_id(j->unit), job_type_to_string(j->type),
+ unit_id(j->unit), job_type_to_string(JOB_START));
+
j->state = JOB_RUNNING;
j->type = JOB_START;
+
job_schedule_run(j);
return 0;
}