unit: don't add Requires for tmp.mount
authorLukas Nykryn <lnykryn@redhat.com>
Mon, 5 Sep 2016 10:47:09 +0000 (12:47 +0200)
committerThe Plumber <50238977+systemd-rhel-bot@users.noreply.github.com>
Fri, 6 Aug 2021 10:23:28 +0000 (12:23 +0200)
rhel-only
Resolves: #1619292

(cherry picked from commit 03e52d33bbdea731eaa79545bb1d30c5b21abe3d)

src/core/mount.c
src/core/unit.c

index 053deac14dbfafb835ebefa29dad6f47de3c1e1a..1fd3102ad3d6b70ce1b82e6f88232d57d62286fc 100644 (file)
@@ -343,7 +343,7 @@ static int mount_add_mount_dependencies(Mount *m) {
                 if (r < 0)
                         return r;
 
-                if (UNIT(m)->fragment_path) {
+                if (UNIT(m)->fragment_path && !streq(UNIT(m)->id, "tmp.mount")) {
                         /* If we have fragment configuration, then make this dependency required */
                         r = unit_add_dependency(other, UNIT_REQUIRES, UNIT(m), true, UNIT_DEPENDENCY_PATH);
                         if (r < 0)
index d9cd0c229aa333ea6e2a56f8212d3904322a04db..371dda7e29b9501e5007cc50d93d708b219115bf 100644 (file)
@@ -1506,7 +1506,7 @@ static int unit_add_mount_dependencies(Unit *u) {
                         if (r < 0)
                                 return r;
 
-                        if (m->fragment_path) {
+                        if (m->fragment_path && !streq(m->id, "tmp.mount")) {
                                 r = unit_add_dependency(u, UNIT_REQUIRES, m, true, di.origin_mask);
                                 if (r < 0)
                                         return r;