summaryrefslogtreecommitdiff
path: root/src/core/unit.h
diff options
context:
space:
mode:
authorMichal Sekletar <msekleta@redhat.com>2012-07-20 15:55:01 +0200
committerMichal Schmidt <mschmidt@redhat.com>2012-07-26 09:16:43 +0200
commit85e9a1010d16064ce435b84f02dc585bc645aade (patch)
tree1be4741f280b3bd9dad29cf31c04de73d8e3c282 /src/core/unit.h
parentc37046cd3cabc07a6e4c5ec09049f56294e10a51 (diff)
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.
Diffstat (limited to 'src/core/unit.h')
-rw-r--r--src/core/unit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/unit.h b/src/core/unit.h
index 2102b7a570..89bd61c2d8 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -75,12 +75,14 @@ enum UnitDependency {
UNIT_REQUISITE_OVERRIDABLE,
UNIT_WANTS,
UNIT_BINDS_TO,
+ UNIT_PART_OF,
/* Inverse of the above */
UNIT_REQUIRED_BY, /* inverse of 'requires' and 'requisite' is 'required_by' */
UNIT_REQUIRED_BY_OVERRIDABLE, /* inverse of 'requires_overridable' and 'requisite_overridable' is 'soft_required_by' */
UNIT_WANTED_BY, /* inverse of 'wants' */
UNIT_BOUND_BY, /* inverse of 'binds_to' */
+ UNIT_CONSISTS_OF, /* inverse of 'part_of' */
/* Negative dependencies */
UNIT_CONFLICTS, /* inverse of 'conflicts' is 'conflicted_by' */