summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c
index 7fd860ed06..dbcd630b05 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -1610,7 +1610,9 @@ static int transaction_add_job_and_dependencies(
dbus_error_free(e);
}
- } else if (type == JOB_STOP || type == JOB_RESTART || type == JOB_TRY_RESTART) {
+ }
+
+ if (type == JOB_STOP || type == JOB_RESTART || type == JOB_TRY_RESTART) {
SET_FOREACH(dep, ret->unit->meta.dependencies[UNIT_REQUIRED_BY], i)
if ((r = transaction_add_job_and_dependencies(m, type, dep, ret, true, override, false, false, ignore_order, e, NULL)) < 0) {
@@ -1633,6 +1635,20 @@ static int transaction_add_job_and_dependencies(
}
}
+ if (type == JOB_RELOAD || type == JOB_RELOAD_OR_START) {
+
+ SET_FOREACH(dep, ret->unit->meta.dependencies[UNIT_PROPAGATE_RELOAD_TO], i) {
+ r = transaction_add_job_and_dependencies(m, JOB_RELOAD, dep, ret, false, override, false, false, ignore_order, e, NULL);
+
+ if (r < 0) {
+ log_warning("Cannot add dependency reload job for unit %s, ignoring: %s", dep->meta.id, bus_error(e, r));
+
+ if (e)
+ dbus_error_free(e);
+ }
+ }
+ }
+
/* JOB_VERIFY_STARTED, JOB_RELOAD require no dependency handling */
}