PrivateTmp-shouldn-t-require-tmpfs.patch 872 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Didier Roche <didrocks@ubuntu.com>
Date: Wed, 18 Mar 2015 17:11:00 +0100
Subject: PrivateTmp shouldn't require tmpfs

As PrivateTmp is requiring tmp.mount, this one will mount (but only after boot)
/tmp as tmpfs adding a Requires=tmp.mount to the unit. This change downgrades
the requirements to an after relationship.
---
 src/core/unit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/unit.c b/src/core/unit.c
index 62163b1..536fd5e 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -736,7 +736,7 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
                 return 0;
 
         if (c->private_tmp) {
-                r = unit_require_mounts_for(u, "/tmp");
+                r = unit_add_dependency_by_name(u, UNIT_AFTER, "tmp.mount", NULL, true);
                 if (r < 0)
                         return r;