]> err.no Git - systemd/commitdiff
transaction: add starting requirements for JOB_RESTART
authorMichal Schmidt <mschmidt@redhat.com>
Fri, 20 Apr 2012 12:44:00 +0000 (14:44 +0200)
committerMichal Schmidt <mschmidt@redhat.com>
Fri, 20 Apr 2012 15:12:29 +0000 (17:12 +0200)
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

index c3e1e1329698efa4dfc0ff74d5b290259b8e7a88..a2efcbcff4a03ea939fa8487f2c3e957ff93dda8 100644 (file)
@@ -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) {