From 73c33e7f225f81e6066386fba997e8ea2ba361b3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 10 Jul 2010 04:46:58 +0200 Subject: [PATCH] mount: add implicit umount.target conflicts only in system mode --- src/automount.c | 3 ++- src/mount.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/automount.c b/src/automount.c index 26fec451..934aa5f3 100644 --- a/src/automount.c +++ b/src/automount.c @@ -201,7 +201,8 @@ static int automount_load(Unit *u) { if ((r = unit_add_dependency(u, UNIT_BEFORE, UNIT(a->mount), true)) < 0) return r; - if (a->meta.default_dependencies) + if (a->meta.default_dependencies && + a->meta.manager->running_as == MANAGER_SYSTEM) if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0) return r; } diff --git a/src/mount.c b/src/mount.c index 57c258f9..36caae3c 100644 --- a/src/mount.c +++ b/src/mount.c @@ -368,7 +368,9 @@ static int mount_load(Unit *u) { if ((r = unit_add_default_cgroup(u)) < 0) return r; - if (m->meta.default_dependencies && !path_equal(m->where, "/")) + if (m->meta.default_dependencies && + m->meta.manager->running_as == MANAGER_SYSTEM && + !path_equal(m->where, "/")) if ((r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0) return r; } -- 2.39.5