diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-10-28 23:18:47 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-10-29 00:45:46 +0200 |
commit | b81884e7466b8e8bc1261b1b1a722d11694b8c54 (patch) | |
tree | a974af7656baa8eadb0bb0fec0bfe44e4885bb8c /src/manager.c | |
parent | 941a4041bdb9d91e9d5033005263efe029621e4f (diff) |
unit: replace StopRetroactively= by BindTo= dependencies
The property StopRetroactively= needs to be per-dependency, not
per-unit, in order to properly express dependencies between .mount units
and its .device and fsck .service units. If the .device unit is
unplugged the mount should go away, but if the fsck process terminates
the .mount should stay.
Diffstat (limited to 'src/manager.c')
-rw-r--r-- | src/manager.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/manager.c b/src/manager.c index 667be2fdcf..796d3cbebe 100644 --- a/src/manager.c +++ b/src/manager.c @@ -1446,6 +1446,10 @@ static int transaction_add_job_and_dependencies( if ((r = transaction_add_job_and_dependencies(m, JOB_START, dep, ret, true, override, false, e, NULL)) < 0 && r != -EBADR) goto fail; + SET_FOREACH(dep, ret->unit->meta.dependencies[UNIT_BIND_TO], i) + if ((r = transaction_add_job_and_dependencies(m, JOB_START, dep, ret, true, override, false, e, NULL)) < 0 && r != -EBADR) + goto fail; + SET_FOREACH(dep, ret->unit->meta.dependencies[UNIT_REQUIRES_OVERRIDABLE], i) if ((r = transaction_add_job_and_dependencies(m, JOB_START, dep, ret, !override, override, false, e, NULL)) < 0 && r != -EBADR) { log_warning("Cannot add dependency job for unit %s, ignoring: %s", dep->meta.id, bus_error(e, r)); @@ -1487,6 +1491,10 @@ static int transaction_add_job_and_dependencies( SET_FOREACH(dep, ret->unit->meta.dependencies[UNIT_REQUIRED_BY], i) if ((r = transaction_add_job_and_dependencies(m, type, dep, ret, true, override, false, e, NULL)) < 0 && r != -EBADR) goto fail; + + SET_FOREACH(dep, ret->unit->meta.dependencies[UNIT_BOUND_BY], i) + if ((r = transaction_add_job_and_dependencies(m, type, dep, ret, true, override, false, e, NULL)) < 0 && r != -EBADR) + goto fail; } /* JOB_VERIFY_STARTED, JOB_RELOAD require no dependency handling */ |