diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-05-19 18:13:22 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-05-19 18:21:19 +0200 |
commit | c6497ccb7153af9a1252c48918e380b5134314de (patch) | |
tree | 00e5106e59779057cd200c1995f5b7b92654aa5b /src/core/manager.c | |
parent | 9ee18af3a036074c4021c82ae2e67f5ccaa9ea9d (diff) |
core: when propagating restart requests due to deps, downgrade restart to try-restart
Previously, if a service A depended on a service B via Requires=, and A
was not running and B restarted this would trigger a start of A as well,
since the restart was propagated as restart independently of the state
of A.
This patch ensures that a restart of B would be propagated as a
try-restart to A, thus not changing its state if it isn't up.
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032061.html
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 2fddc44fe3..e889ebe1f1 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1204,7 +1204,7 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove log_unit_debug(unit, "Trying to enqueue job %s/%s/%s", unit->id, job_type_to_string(type), job_mode_to_string(mode)); - job_type_collapse(&type, unit); + type = job_type_collapse(type, unit); tr = transaction_new(mode == JOB_REPLACE_IRREVERSIBLY); if (!tr) |