chiark / gitweb /
systemd: added new dependency PartOf
authorMichal Sekletar <msekleta@redhat.com>
Fri, 20 Jul 2012 13:55:01 +0000 (15:55 +0200)
committerMichal Schmidt <mschmidt@redhat.com>
Thu, 26 Jul 2012 07:16:43 +0000 (09:16 +0200)
commit85e9a1010d16064ce435b84f02dc585bc645aade
tree1be4741f280b3bd9dad29cf31c04de73d8e3c282
parentc37046cd3cabc07a6e4c5ec09049f56294e10a51
systemd: added new dependency PartOf

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
src/core/load-fragment-gperf.gperf.m4
src/core/transaction.c
src/core/unit.c
src/core/unit.h