restructure

This commit is contained in:
teldra 2021-03-12 18:37:09 +01:00
parent 430f931922
commit 8fbdd380c8
1 changed files with 1 additions and 2 deletions

View File

@ -6,9 +6,8 @@ diskid="${cfg[diskid]//-/_}"
if [[ ! "${cfg[fde_key_store]}" == "none" ]] && [[ ! "${cfg[fde_key_store]}" == "once" ]]; then
if ! grep -q "GRUB_ENABLE_CRYPTODISK" "${dest}"/etc/default/grub; then
echo "GRUB_ENABLE_CRYPTODISK=y" >> "${dest}"/etc/default/grub
fi
if [[ ! -f "${dest}"/boot/volume.key ]] && [[ ! "${cfg[fde_key_store]}" == "twice" ]]; then
dd bs=1 count=64 if=/dev/urandom of="${dest}"/boot/volume.key
echo -n "${cfg[diskpw]}" | cryptsetup luksAddKey "${cfg[diskname]}${cfg[target_part]}" "${dest}"/boot/volume.key -d -