From 65304075249449a713b4e4842b8538ef4aa1c725 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Fri, 20 Apr 2012 14:44:00 +0200 Subject: [PATCH] transaction: add starting requirements for JOB_RESTART While having a Requires= dependency between units, the dependency is started automatically on "systemctl start", but it's not started on "systemctl restart". JOB_RESTART jobs did not pull the dependencies for starting into the transaction. https://bugzilla.redhat.com/show_bug.cgi?id=802770 Note that the other bug noted in comment #2 has been fixed already by avoiding the deletion of anchor jobs. --- src/core/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/transaction.c b/src/core/transaction.c index c3e1e1329..a2efcbcff 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -866,7 +866,7 @@ int transaction_add_job_and_dependencies( } /* Finally, recursively add in all dependencies. */ - if (type == JOB_START || type == JOB_RELOAD_OR_START) { + if (type == JOB_START || type == JOB_RELOAD_OR_START || type == JOB_RESTART) { SET_FOREACH(dep, ret->unit->dependencies[UNIT_REQUIRES], i) { r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, true, override, false, false, ignore_order, e); if (r < 0) { -- 2.30.2