/[pkg-src]/trunk/systemd/patches/systemd-37-mount-order-remote-mounts-after-both-network.target-and-remote-fs-pre.target.patch |
Contents of /trunk/systemd/patches/systemd-37-mount-order-remote-mounts-after-both-network.target-and-remote-fs-pre.target.patch
Parent Directory | Revision Log
Revision 1562 -
(show annotations)
(download)
Thu Nov 17 14:00:05 2011 UTC (12 years, 10 months ago) by niro
File size: 1767 byte(s)
Thu Nov 17 14:00:05 2011 UTC (12 years, 10 months ago) by niro
File size: 1767 byte(s)
fedora and upstream fixes
1 | From 7fc2a89a7387db1e5daa4892393c9e9536920c25 Mon Sep 17 00:00:00 2001 |
2 | From: Lennart Poettering <lennart@poettering.net> |
3 | Date: Tue, 1 Nov 2011 22:27:48 +0100 |
4 | Subject: [PATCH] mount: order remote mounts after both network.target and |
5 | remote-fs-pre.target |
6 | |
7 | Since remote-fs-pre.target is optional we cannot count on it to order |
8 | remote mounts after network.target, so let's add that order explicitly |
9 | in addition to remote-fs-pre.target. |
10 | |
11 | https://bugzilla.redhat.com/show_bug.cgi?id=749940 |
12 | --- |
13 | src/mount.c | 7 ++++++- |
14 | 1 files changed, 6 insertions(+), 1 deletions(-) |
15 | |
16 | diff --git a/src/mount.c b/src/mount.c |
17 | index ef953f0..f9cfe91 100644 |
18 | --- a/src/mount.c |
19 | +++ b/src/mount.c |
20 | @@ -327,7 +327,7 @@ static bool needs_quota(MountParameters *p) { |
21 | } |
22 | |
23 | static int mount_add_fstab_links(Mount *m) { |
24 | - const char *target, *after = NULL; |
25 | + const char *target, *after = NULL, *after2 = NULL; |
26 | MountParameters *p; |
27 | Unit *tu; |
28 | int r; |
29 | @@ -358,6 +358,7 @@ static int mount_add_fstab_links(Mount *m) { |
30 | if (mount_is_network(p)) { |
31 | target = SPECIAL_REMOTE_FS_TARGET; |
32 | after = SPECIAL_REMOTE_FS_PRE_TARGET; |
33 | + after2 = SPECIAL_NETWORK_TARGET; |
34 | } else { |
35 | target = SPECIAL_LOCAL_FS_TARGET; |
36 | after = SPECIAL_LOCAL_FS_PRE_TARGET; |
37 | @@ -374,6 +375,10 @@ static int mount_add_fstab_links(Mount *m) { |
38 | if ((r = unit_add_dependency_by_name(UNIT(m), UNIT_AFTER, after, NULL, true)) < 0) |
39 | return r; |
40 | |
41 | + if (after2) |
42 | + if ((r = unit_add_dependency_by_name(UNIT(m), UNIT_AFTER, after2, NULL, true)) < 0) |
43 | + return r; |
44 | + |
45 | if (automount) { |
46 | Unit *am; |
47 | |
48 | -- |
49 | 1.7.7 |
50 |