diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-14 10:25:33 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-14 12:42:45 +0200 |
commit | 3c0a1b1e70c1fe6e0b6707fab7dc86b1500d0f82 (patch) | |
tree | a2e5163913b547c6a6f143ee5085b905bef69c3a /src | |
parent | sd-event: increase test-event timeout to 120s (diff) | |
download | systemd-3c0a1b1e70c1fe6e0b6707fab7dc86b1500d0f82.tar.xz systemd-3c0a1b1e70c1fe6e0b6707fab7dc86b1500d0f82.zip |
core: Imply DefaultDependencies=no for credential mounts
Currently, on soft-reboot, /run/credentials/@system is unmounted
because it has DefaultDependencies=yes and as such will have
Conflicts=umount.target and Before=umount.target. Let's make sure
credential mounts survive soft-reboot by implying DefaultDependencies=no
for credential mounts.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/mount.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index 3bf7e89e38..e43a93ac21 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -463,10 +463,7 @@ static int mount_add_default_ordering_dependencies(Mount *m, MountParameters *p, after = SPECIAL_LOCAL_FS_PRE_TARGET; before = SPECIAL_INITRD_USR_FS_TARGET; - } else if (mount_is_credentials(m)) - after = before = NULL; - - else if (mount_is_network(p)) { + } else if (mount_is_network(p)) { after = SPECIAL_REMOTE_FS_PRE_TARGET; before = SPECIAL_REMOTE_FS_TARGET; @@ -653,6 +650,9 @@ static int mount_add_extras(Mount *m) { return r; } + if (mount_is_credentials(m)) + u->default_dependencies = false; + r = unit_patch_contexts(u); if (r < 0) return r; |