]> err.no Git - systemd/commitdiff
mount: add implicit umount.target conflicts only in system mode
authorLennart Poettering <lennart@poettering.net>
Sat, 10 Jul 2010 02:46:58 +0000 (04:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 10 Jul 2010 02:46:58 +0000 (04:46 +0200)
src/automount.c
src/mount.c

index 26fec45107b35ad0e95aa9f0714a86b3ed11d79f..934aa5f35d78dc83716a56433d0ff3d4e8e28838 100644 (file)
@@ -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;
         }
index 57c258f9f255908b86eba0d664f7b68fd2e76407..36caae3c812d7ee6299a743072449be926872b0b 100644 (file)
@@ -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;
         }