Skip to content

Commit 99df06c

Browse files
committed
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. Signed-off-by: Richard Laager <[email protected]>
1 parent 9f62805 commit 99df06c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

etc/systemd/system-generators/zfs-mount-generator.in

+4
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ ${keymountdep}
212212
[Service]
213213
Type=oneshot
214214
RemainAfterExit=yes
215+
# This avoids a dependency loop involving systemd-journald.socket if this
216+
# dataset is a parent of the root filesystem.
217+
StandardOutput=null
218+
StandardError=null
215219
ExecStart=${keyloadcmd}
216220
ExecStop=@sbindir@/zfs unload-key '${dataset}'" > "${dest_norm}/${keyloadunit}"
217221
fi

0 commit comments

Comments
 (0)