diff options
author | Jonathan Lebon <jonathan@jlebon.com> | 2020-10-27 13:29:38 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-12-08 18:08:30 +0100 |
commit | 31c2cc7583455f7e8c7f29241faea72ec3b19f41 (patch) | |
tree | a312e9cf87cae8d576d819ce68b14b4f81528477 | |
parent | 141f3e4dd065b7aa7f4b5b1353a99b74cf5089c6 (diff) | |
download | systemd-31c2cc7583455f7e8c7f29241faea72ec3b19f41.tar.gz |
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.]
(cherry picked from commit e921ebb57e0bc823ac167801cb5dd5f119f5d585)
-rw-r--r-- | units/meson.build | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/units/meson.build b/units/meson.build index 20a1e07503..031237c436 100644 --- a/units/meson.build +++ b/units/meson.build @@ -59,7 +59,8 @@ units = [ ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'], ['reboot.target', '', 'ctrl-alt-del.target' + (with_runlevels ? ' runlevel6.target' : '')], - ['remote-cryptsetup.target', 'HAVE_LIBCRYPTSETUP'], + ['remote-cryptsetup.target', 'HAVE_LIBCRYPTSETUP', + 'initrd-root-device.target.wants/'], ['remote-fs-pre.target', ''], ['remote-fs.target', ''], ['rescue.target', '', |