From 3f7ba240403cce436ccc1fad12ecb6c83cc609e0 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Wed, 21 Oct 2020 09:20:55 +0200 Subject: [PATCH] Remove line break in luks keyfile --- debian/chroot.install | 2 +- debian/chroot.mount | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/chroot.install b/debian/chroot.install index 44a0ee5..187f7a0 100755 --- a/debian/chroot.install +++ b/debian/chroot.install @@ -68,7 +68,7 @@ if [ "${manage_part}" -eq 0 ]; then parted "${hdd}" mkpart primary 512MB 100% || exit 1 parted "${hdd}" set 2 lvm on if [ "${manage_luks}" -eq 0 ]; then - rm -f -- "${luks_key_file}" && printf '%b\n' "${luks_passphrase}" > "${luks_key_file}" + rm -f -- "${luks_key_file}" && printf '%b' "${luks_passphrase}" > "${luks_key_file}" cryptsetup -c aes-xts-plain -s 512 --use-random -y luksFormat "${hdd}"2 "${luks_passphrase}" --key-file "${luks_key_file}" || exit 2 cryptsetup luksOpen "${hdd}"2 "${luks_pv_name}" --key-file "${luks_key_file}" || exit 2 pvcreate /dev/mapper/"${luks_pv_name}" || exit 3 diff --git a/debian/chroot.mount b/debian/chroot.mount index 8a9a5f3..74bb0be 100755 --- a/debian/chroot.mount +++ b/debian/chroot.mount @@ -34,7 +34,7 @@ fi ## Open LUKS system {{{ if [ "${manage_luks}" -eq 0 ]; then ### Put passphrase in a keyfile for multiple usage - rm -f -- "${luks_key_file}" && printf '%b\n' "${luks_passphrase}" > "${luks_key_file}" + rm -f -- "${luks_key_file}" && printf '%b' "${luks_passphrase}" > "${luks_key_file}" ### If the volume is not already opened if [ ! -h /dev/mapper/"${luks_pv_name}" ]; then ### Open LUKS system