summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-10-03 22:15:08 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-10-03 22:15:08 -0400
commit77009452cfd25208509b14ea985e81fdf9f7d40e (patch)
treecbf5c867d7ceaed2137ea2a2d60da88eaeca6f27 /src
parent5862d652ba14178cff46b8a8fc6c6d8392bf32b1 (diff)
systemd: order remote mounts from mountinfo before remote-fs.target
Usually the network is stopped before filesystems are umounted. Ordering network filesystems before remote-fs.target means that their unmounting will be performed earlier, and can terminate sucessfully. https://bugs.freedesktop.org/show_bug.cgi?id=70002
Diffstat (limited to 'src')
-rw-r--r--src/core/mount.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 3d46557fb1..93bfa99f3f 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1440,6 +1440,9 @@ static int mount_add_one(
u = manager_get_unit(m, e);
if (!u) {
+ const char* const target =
+ fstype_is_network(fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
+
delete = true;
u = unit_new(m, sizeof(Mount));
@@ -1466,7 +1469,7 @@ static int mount_add_one(
goto fail;
}
- r = unit_add_dependency_by_name(u, UNIT_BEFORE, SPECIAL_LOCAL_FS_TARGET, NULL, true);
+ r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true);
if (r < 0)
goto fail;