Skip to content

Commit

Permalink
ext: fs-cryptroot-support: don't abuse add_host_dependencies
Browse files Browse the repository at this point in the history
- use correct hook to make config changes
  • Loading branch information
rpardini authored and igorpecovnik committed Jun 23, 2024
1 parent e797126 commit ee37a0c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions extensions/fs-cryptroot-support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
function add_host_dependencies__add_cryptroot_tooling() {
display_alert "Adding cryptroot to host dependencies" "cryptsetup LUKS" "debug"
EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} cryptsetup openssh-client" # @TODO: convert to array later

display_alert "Adding rootfs encryption related packages" "cryptsetup cryptsetup-initramfs" "info"
add_packages_to_rootfs cryptsetup cryptsetup-initramfs

if [[ $CRYPTROOT_SSH_UNLOCK == yes ]]; then
display_alert "Adding rootfs encryption related packages" "dropbear-initramfs" "info"
add_packages_to_rootfs dropbear-initramfs
fi
}

function extension_prepare_config__prepare_cryptroot() {
display_alert "Adding rootfs encryption related packages" "cryptsetup cryptsetup-initramfs" "info"
add_packages_to_image cryptsetup cryptsetup-initramfs

# Config for cryptroot, a boot partition is required.
declare -g BOOTPART_REQUIRED=yes
EXTRA_IMAGE_SUFFIXES+=("-crypt")

if [[ $CRYPTROOT_SSH_UNLOCK == yes ]]; then
display_alert "Adding rootfs encryption related packages" "dropbear-initramfs" "info"
add_packages_to_image dropbear-initramfs
fi
}

function prepare_root_device__encrypt_root_device() {
Expand Down

0 comments on commit ee37a0c

Please sign in to comment.