summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-26 22:58:54 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-26 22:58:54 +0200
commit510051fc1264ace4ab657b52ec6fb5e2ccfda740 (patch)
treeb8c0a981b78f8cf6511b781eff05d90283c34997 /src/mount.c
parentda8f9f8cff32029c74e9e566435079b2c5db0a5e (diff)
swap: add only swaps listed in /etc/fstab automatically to swap.target, others should be added via .wants/ links
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mount.c b/src/mount.c
index 3fc0f13716..d62ce8f408 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -265,7 +265,7 @@ static int mount_add_target_links(Mount *m) {
MountParameters *p;
Unit *tu;
int r;
- bool noauto, handle, automount, user;
+ bool noauto, handle, automount;
assert(m);
@@ -277,7 +277,6 @@ static int mount_add_target_links(Mount *m) {
return 0;
noauto = !!mount_test_option(p->options, MNTOPT_NOAUTO);
- user = mount_test_option(p->options, "user") || mount_test_option(p->options, "users");
handle = !!mount_test_option(p->options, "comment=systemd.mount") ||
m->meta.manager->mount_auto;
automount = !!mount_test_option(p->options, "comment=systemd.automount");
@@ -311,10 +310,10 @@ static int mount_add_target_links(Mount *m) {
* configured to local-fs.target */
if (!noauto &&
handle &&
- !m->from_fragment)
- if (user || m->meta.manager->running_as == MANAGER_SYSTEM)
- if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(m), true)) < 0)
- return r;
+ m->from_etc_fstab &&
+ m->meta.manager->running_as == MANAGER_SYSTEM)
+ if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(m), true)) < 0)
+ return r;
return unit_add_dependency(UNIT(m), UNIT_BEFORE, tu, true);
}