diff --git a/etc/systemd/system-generators/zfs-mount-generator.in b/etc/systemd/system-generators/zfs-mount-generator.in index de49afe8b4a5..28439f424ad9 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