diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2020-04-23 17:47:12 +0200 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2020-04-23 17:47:12 +0200 |
commit | c3a6e65438b6088dced4aca3da1b045e59d192d6 (patch) | |
tree | 4d092ae60b5387a73ee9e6bfcea9fb5bc25ee78e /share/hooks | |
parent | aa8f8323f7c435b6380b145b7d5b037ee708e54b (diff) | |
download | vyos-live-build-c3a6e65438b6088dced4aca3da1b045e59d192d6.tar.gz vyos-live-build-c3a6e65438b6088dced4aca3da1b045e59d192d6.zip |
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
Diffstat (limited to 'share/hooks')
-rwxr-xr-x | share/hooks/normal/0030-enable-cryptsetup.hook.chroot | 9 |
1 files changed, 9 insertions, 0 deletions
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 |