aboutsummaryrefslogtreecommitdiff
path: root/installer/lib/btrfs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'installer/lib/btrfs.sh')
-rw-r--r--installer/lib/btrfs.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/installer/lib/btrfs.sh b/installer/lib/btrfs.sh
index 0715ba7..0a34be0 100644
--- a/installer/lib/btrfs.sh
+++ b/installer/lib/btrfs.sh
@@ -212,11 +212,7 @@ configure_luks_initramfs() {
# Include keyfile in initramfs for testing mode (unattended boot)
if [[ "${TESTING:-}" == "yes" ]]; then
info "Testing mode: embedding keyfile in initramfs"
- sed -i "s|^FILES=.*|FILES=($LUKS_KEYFILE)|" $MNTPOINT/etc/mkinitcpio.conf
- # If FILES line doesn't exist, add it
- if ! grep -q "^FILES=" $MNTPOINT/etc/mkinitcpio.conf; then
- echo "FILES=($LUKS_KEYFILE)" >> $MNTPOINT/etc/mkinitcpio.conf
- fi
+ ensure_initramfs_files "$LUKS_KEYFILE" "$MNTPOINT/etc/mkinitcpio.conf"
fi
# Create crypttab.initramfs for sd-encrypt (used by multi-disk LUKS)