core: when propagating restart requests due to deps, downgrade restart to try-restart
authorLennart Poettering <lennart@poettering.net>
Tue, 19 May 2015 16:13:22 +0000 (18:13 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 19 May 2015 16:21:19 +0000 (18:21 +0200)
commitc6497ccb7153af9a1252c48918e380b5134314de
tree00e5106e59779057cd200c1995f5b7b92654aa5b
parent9ee18af3a036074c4021c82ae2e67f5ccaa9ea9d
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
src/core/job.c
src/core/job.h
src/core/manager.c
src/core/transaction.c