diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-02-25 22:05:14 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-02-25 22:06:54 +0100 |
commit | 5bd4b173605142c7be493aa4d958ebaef21f421d (patch) | |
tree | 34f20cfb3bcdbb839ff9fea8ce7b831432d08a67 /src | |
parent | c6c8f6e218995852350e5e35c080dec788c42c3f (diff) |
unit: use weaker dependencies between mount and device units in --user mode
When running in user mode unmounting of mount units when a device
vanishes is unlikely to work, and even if it would work is already done
by PID 1 anyway. HEnce, when creating implicit dependencies between
mount units and their backing devices, created a Wants= type dependency
in --user mode, but leave a BindsTo= dependency in --system mode.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/unit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index ad5348b57b..875befa0a2 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -2839,7 +2839,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) { if (r < 0) return r; - r = unit_add_two_dependencies(u, UNIT_AFTER, UNIT_BINDS_TO, device, true); + r = unit_add_two_dependencies(u, UNIT_AFTER, u->manager->running_as == SYSTEMD_SYSTEM ? UNIT_BINDS_TO : UNIT_WANTS, device, true); if (r < 0) return r; |