summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-25 03:11:26 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-25 03:11:26 +0200
commitd3689161a2870a56ba5a2837daa2ca3463e24710 (patch)
tree32b34eae66a613db706284e6e113a44fccb9f44e /src/mount.c
parent20604ebc04ce5d3b7d7d63e79f94cf0febf851c5 (diff)
mount: add global configuration options for handling of auto mounts
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)