From c3a6e65438b6088dced4aca3da1b045e59d192d6 Mon Sep 17 00:00:00 2001 From: Raphaƫl Hertzog Date: Thu, 23 Apr 2020 17:47:12 +0200 Subject: Add updated directives to enable cryptsetup support in initrd This fixes cryptsetup modules not being installed into initrd with warning: > cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries > nor crypto modules. If that's on purpose, you may want to uninstall the > 'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs > integration and avoid this warning. Thanks-to: Marcel Partap --- share/hooks/normal/0030-enable-cryptsetup.hook.chroot | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'share/hooks') diff --git a/share/hooks/normal/0030-enable-cryptsetup.hook.chroot b/share/hooks/normal/0030-enable-cryptsetup.hook.chroot index 9d46ccc77..0dc4aaa3e 100755 --- a/share/hooks/normal/0030-enable-cryptsetup.hook.chroot +++ b/share/hooks/normal/0030-enable-cryptsetup.hook.chroot @@ -18,4 +18,13 @@ then EOF fi + + if [ -e /etc/cryptsetup-initramfs/conf-hook ]; then + if grep -q '^#CRYPTSETUP=' /etc/cryptsetup-initramfs/conf-hook; then + sed -i -e 's/^#CRYPTSETUP=.*/CRYPTSETUP=y/' \ + /etc/cryptsetup-initramfs/conf-hook + else + echo "CRYPTSETUP=y" >>/etc/cryptsetup-initramfs/conf-hook + fi + fi fi -- cgit v1.2.3