summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mount.c b/src/mount.c
index b667ae52c9..b49443ced1 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -244,7 +244,8 @@ static int mount_add_target_links(Mount *m) {
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");
+ handle = !!mount_test_option(p->options, "comment=systemd.mount") ||
+ m->meta.manager->mount_auto;
automount = !!mount_test_option(p->options, "comment=systemd.automount");
if (mount_test_option(p->options, "_netdev") ||
@@ -362,7 +363,9 @@ static int mount_load(Unit *u) {
what = m->parameters_proc_self_mountinfo.what;
if (what && !path_equal(m->where, "/"))
- if ((r = unit_add_node_link(u, what, u->meta.manager->running_as == MANAGER_SYSTEM)) < 0)
+ if ((r = unit_add_node_link(u, what,
+ u->meta.manager->running_as == MANAGER_SYSTEM &&
+ u->meta.manager->mount_on_plug)) < 0)
return r;
if ((r = mount_add_mount_links(m)) < 0)