aboutsummaryrefslogtreecommitdiffstats
path: root/etc/systemd
diff options
context:
space:
mode:
authorRichard Laager <[email protected]>2020-05-30 20:39:31 -0500
committerBrian Behlendorf <[email protected]>2020-08-30 14:18:45 -0700
commit0fba4d138c8eee10c038d42fe0d40a4ea7481027 (patch)
treeb1ad8ccfe6b19dc02bf29eb302408db099d8a8ee /etc/systemd
parent6bf3f4dfe5a6af1a7cff71a7557c9fc290517778 (diff)
Fix another dependency loop
zfs-load-key-DATASET.service was gaining an After=systemd-journald.socket due to its stdout/stderr going to the journal (which is the default). systemd-journald.socket has an After (via RequiresMountsFor=/run/systemd/journal) on -.mount. If the root filesystem is encrypted, -.mount gets an After zfs-load-key-DATASET.service. By setting stdout and stderr to null on the key load services, we avoid this loop. Reviewed-by: Antonio Russo <[email protected]> Reviewed-by: InsanePrawn <[email protected]> Signed-off-by: Richard Laager <[email protected]> Closes #10356 Closes #10388
Diffstat (limited to 'etc/systemd')
-rwxr-xr-xetc/systemd/system-generators/zfs-mount-generator.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/systemd/system-generators/zfs-mount-generator.in b/etc/systemd/system-generators/zfs-mount-generator.in
index de49afe8b..28439f424 100755
--- a/etc/systemd/system-generators/zfs-mount-generator.in
+++ b/etc/systemd/system-generators/zfs-mount-generator.in
@@ -221,6 +221,10 @@ ${keymountdep}
[Service]
Type=oneshot
RemainAfterExit=yes
+# This avoids a dependency loop involving systemd-journald.socket if this
+# dataset is a parent of the root filesystem.
+StandardOutput=null
+StandardError=null
ExecStart=${keyloadcmd}
ExecStop=${keyunloadcmd}" > "${dest_norm}/${keyloadunit}"
fi