#!/bin/sh
# initramfs-tools hook: ship dek-fetch and the cryptsetup stack it needs.
#
# The binary is a static Go build, so only the tools wrapped around it have to
# be copied explicitly.
. /usr/share/initramfs-tools/hook-functions

copy_exec /usr/bin/dek-fetch /bin/dek-fetch
copy_exec /sbin/cryptsetup /sbin/cryptsetup

# LUKS on LVM: the test volume is an LV, so dm-crypt and its ciphers must be
# present even though the real root is unencrypted.
manual_add_modules dm_crypt
manual_add_modules aes
manual_add_modules xts
manual_add_modules sha256
