X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmount.c;h=b49443ced11b962e8d930049647ca49cf3b009f0;hb=f3d41013e24a81b2c853393593d1d52c156826ec;hp=ac33787e61e42c8307a3386419dcc7056b566a1d;hpb=11ce3427242b8b4ddf638ed5703d69041d719b4c;p=elogind.git diff --git a/src/mount.c b/src/mount.c index ac33787e6..b49443ced 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") || @@ -361,8 +362,10 @@ static int mount_load(Unit *u) { else if (m->from_proc_self_mountinfo && m->parameters_proc_self_mountinfo.what) what = m->parameters_proc_self_mountinfo.what; - if (what) - if ((r = unit_add_node_link(u, what, u->meta.manager->running_as == MANAGER_SYSTEM)) < 0) + if (what && !path_equal(m->where, "/")) + 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)