summaryrefslogtreecommitdiffstats
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-06-17 21:12:53 +0200
committerLennart Poettering <lennart@poettering.net>2013-06-17 21:12:53 +0200
commit602c0e740f8290cc9c4f13f2eb4b23fbbd7a8d2b (patch)
treec81c4658026194f5f8f619e83482b3e349f08f0c /src/core/mount.c
parentrpm: define a %_userunitdir macro (diff)
downloadsystemd-602c0e740f8290cc9c4f13f2eb4b23fbbd7a8d2b.tar.xz
systemd-602c0e740f8290cc9c4f13f2eb4b23fbbd7a8d2b.zip
mount: when learning about the root mount from mountinfo, don't add conflicting dep for umount.target
That way systemd won't try to umount it at shutdown.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 10073b50be..0ad3d951a5 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1538,9 +1538,11 @@ static int mount_add_one(
if (r < 0)
goto fail;
- r = unit_add_dependency_by_name(u, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true);
- if (r < 0)
- goto fail;
+ if (!path_equal(where, "/")) {
+ r = unit_add_dependency_by_name(u, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true);
+ if (r < 0)
+ goto fail;
+ }
unit_add_to_load_queue(u);
} else {