]> git.ipfire.org Git - thirdparty/systemd.git/commit
units: unconditionally pull in remote-cryptsetup.target in the initramfs 17467/head
authorJonathan Lebon <jonathan@jlebon.com>
Tue, 27 Oct 2020 12:29:38 +0000 (13:29 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 27 Oct 2020 12:49:01 +0000 (13:49 +0100)
commite921ebb57e0bc823ac167801cb5dd5f119f5d585
tree3c8c1f0d545a2e39542fabb6a1acb8a3149e121f
parent6bdcb72086b681a0d42521169fdadb65ef2ac539
units: unconditionally pull in remote-cryptsetup.target in the initramfs

[zjs: Replaces #17149.

I took half of the patch in
https://github.com/systemd/systemd/pull/17149#issuecomment-698399194,
hence I'm keeping Jonathan's authorship.

The original reasoning for 6c5496c492a8d74e54d22bf8824160cab1e63c10 was that we
enable remote-cryptsetup.target via presets, and since presets are not used for
the initrd, we need a different target. But since parts of the unit and target
tree are shared between the initramfs and the main system, we can't just create
a separate target for the initramfs. All the targets that depend on this one
would need to be split also. That condition is true for initrd-fs.target, but
not for sysinit.target.

So let's instead just uncoditionally pull in remote-cryptsetup.target in the
initramfs. It should normally be empty, so there should be no impact on boots
that don't have units in the target.

Jonathan's patch used initrd-root-fs.target, this version instead uses
initrd-root-device.target. initrd-root-device.target is ordered before
sysroot.mount, which means that the decrypted devices will be available earlier
too.]
units/meson.build