[systemd-devel] [PATCH] systemd: added new dependency PartOf

Michal Schmidt mschmidt at redhat.com
Thu Jul 26 00:54:21 PDT 2012


On 07/20/2012 03:55 PM, Michal Sekletar wrote:
> This should address TODO item "new dependency type to "group" services
> in a target". Semantic of new dependency is as follows. Once configured
> it creates dependency which will cause that all dependent units get
> stopped if unit they all depend on is stopped or restarted.  Usual use
> case would be configuring PartOf=some.target in template unit file
> and WantedBy=some.target in [Install] section and enabling desired
> number of instances. In this case starting one instance won't pull in
> target but stopping or starting target(in case of WantedBy is properly
> configured) will cause stop/start of all instances.
> ---
>   man/systemd.unit.xml                  |   15 +++++++++++++++
>   src/core/load-fragment-gperf.gperf.m4 |    1 +
>   src/core/transaction.c                |   12 ++++++++++++
>   src/core/unit.c                       |    3 ++-
>   src/core/unit.h                       |    2 ++
>   5 files changed, 32 insertions(+), 1 deletion(-)

Applied, with some additions on top.
Thanks!



More information about the systemd-devel mailing list