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
This commit is contained in:
Raphaël Hertzog 2020-04-23 17:47:12 +02:00
parent aa8f8323f7
commit c3a6e65438
1 changed files with 9 additions and 0 deletions

View File

@ -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