Sophie

Sophie

distrib > Fedora > 17 > x86_64 > by-pkgid > ab4b662b9827b6375ffd451bf4abd615 > files > 191

systemd-44-24.fc17.src.rpm

From e492422511dea6e51105fbd68bf22975def19136 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
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.
(cherry picked from commit 65304075249449a713b4e4842b8538ef4aa1c725)
---
 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 c3e1e13..a2efcbc 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) {