summaryrefslogtreecommitdiff
path: root/src/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-28 03:38:52 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-28 03:38:52 +0200
commitf14e15f8affe906a45d8afc76c302a49cd1f70ee (patch)
tree5af3ffd29e33fddde628d8a79ea7400a9025aaf6 /src/unit.c
parent799fd0fd23028a58e1f605c6b0d9aaab65b4fb1f (diff)
unit: replace recursive_stop by stop_retroactively to simplify things a little
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/unit.c b/src/unit.c
index 1775c1daf..f080e7bef 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -652,13 +652,13 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
if (u->meta.load_state == UNIT_LOADED) {
fprintf(f,
- "%s\tRecursive Stop: %s\n"
+ "%s\tStopRetroactively: %s\n"
"%s\tStopWhenUnneeded: %s\n"
"%s\tRefuseManualStart: %s\n"
"%s\tRefuseManualStop: %s\n"
"%s\tDefaultDependencies: %s\n"
"%s\tIgnoreDependencyFailure: %s\n",
- prefix, yes_no(u->meta.recursive_stop),
+ prefix, yes_no(u->meta.stop_retroactively),
prefix, yes_no(u->meta.stop_when_unneeded),
prefix, yes_no(u->meta.refuse_manual_start),
prefix, yes_no(u->meta.refuse_manual_stop),
@@ -1011,12 +1011,11 @@ static void retroactively_stop_dependencies(Unit *u) {
assert(u);
assert(UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(u)));
- if (u->meta.recursive_stop) {
- /* Pull down units need us recursively if enabled */
- SET_FOREACH(other, u->meta.dependencies[UNIT_REQUIRED_BY], i)
- if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other)))
- manager_add_job(u->meta.manager, JOB_STOP, other, JOB_REPLACE, true, NULL, NULL);
- }
+ /* Pull down units which need us recursively if enabled */
+ SET_FOREACH(other, u->meta.dependencies[UNIT_REQUIRED_BY], i)
+ if (other->meta.stop_retroactively &&
+ !UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other)))
+ manager_add_job(u->meta.manager, JOB_STOP, other, JOB_REPLACE, true, NULL, NULL);
/* Garbage collect services that might not be needed anymore, if enabled */
SET_FOREACH(other, u->meta.dependencies[UNIT_REQUIRES], i)