richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
4295f9
From 209af66ef66a67a9cafa5a1d6364ce436cd593aa Mon Sep 17 00:00:00 2001
4295f9
From: Lukas Nykryn <lnykryn@redhat.com>
4295f9
Date: Mon, 5 Sep 2016 12:47:09 +0200
4295f9
Subject: [PATCH] unit: don't add Requires for tmp.mount
4295f9
4295f9
rhel-only
4295f9
Resolves: #1619292
4295f9
4295f9
(cherry picked from commit 03e52d33bbdea731eaa79545bb1d30c5b21abe3d)
4295f9
---
4295f9
 src/core/mount.c | 2 +-
4295f9
 src/core/unit.c  | 2 +-
4295f9
 2 files changed, 2 insertions(+), 2 deletions(-)
4295f9
4295f9
diff --git a/src/core/mount.c b/src/core/mount.c
4295f9
index 053deac14d..1fd3102ad3 100644
4295f9
--- a/src/core/mount.c
4295f9
+++ b/src/core/mount.c
4295f9
@@ -343,7 +343,7 @@ static int mount_add_mount_dependencies(Mount *m) {
4295f9
                 if (r < 0)
4295f9
                         return r;
4295f9
 
4295f9
-                if (UNIT(m)->fragment_path) {
4295f9
+                if (UNIT(m)->fragment_path && !streq(UNIT(m)->id, "tmp.mount")) {
4295f9
                         /* If we have fragment configuration, then make this dependency required */
4295f9
                         r = unit_add_dependency(other, UNIT_REQUIRES, UNIT(m), true, UNIT_DEPENDENCY_PATH);
4295f9
                         if (r < 0)
4295f9
diff --git a/src/core/unit.c b/src/core/unit.c
4295f9
index d9cd0c229a..371dda7e29 100644
4295f9
--- a/src/core/unit.c
4295f9
+++ b/src/core/unit.c
4295f9
@@ -1506,7 +1506,7 @@ static int unit_add_mount_dependencies(Unit *u) {
4295f9
                         if (r < 0)
4295f9
                                 return r;
4295f9
 
4295f9
-                        if (m->fragment_path) {
4295f9
+                        if (m->fragment_path && !streq(m->id, "tmp.mount")) {
4295f9
                                 r = unit_add_dependency(u, UNIT_REQUIRES, m, true, di.origin_mask);
4295f9
                                 if (r < 0)
4295f9
                                         return r;