Files
cryptsetup/misc/dracut_90reencrypt/module-setup.sh
Ondrej Kozina e52d5f3d98 90reencrypt fixes:
- add loop module to initramfs image
- modprobe loop before reencrypt start
- add rd.luks.reencrypt_keyslot=
- add conflict with dracut crypt module
- drop to emergency_shell after reencryption
2013-11-10 17:38:11 +01:00

30 lines
703 B
Bash
Executable File

#!/bin/bash
check() {
[ -x /sbin/cryptsetup-reencrypt ] || return 1
return 255
}
depends() {
echo dm rootfs-block
}
installkernel() {
# requires hostonly='' override so that loop module is pulled in initramfs
# even if not loaded in actual kernel. dracut bug?
hostonly='' instmods dm_crypt =crypto loop
}
install() {
if dracut_module_included crypt; then
derror "'reencrypt' can't be installed together with 'crypt'."
derror "Add '-o crypt' option to install reencrypt module."
return 1
fi
dracut_install cryptsetup-reencrypt
inst_hook cmdline 30 "$moddir/parse-reencrypt.sh"
inst_simple "$moddir"/reencrypt.sh /sbin/reencrypt
}