Remove line break in luks keyfile
This commit is contained in:
parent
2e43d4f855
commit
3f7ba24040
|
@ -68,7 +68,7 @@ if [ "${manage_part}" -eq 0 ]; then
|
||||||
parted "${hdd}" mkpart primary 512MB 100% || exit 1
|
parted "${hdd}" mkpart primary 512MB 100% || exit 1
|
||||||
parted "${hdd}" set 2 lvm on
|
parted "${hdd}" set 2 lvm on
|
||||||
if [ "${manage_luks}" -eq 0 ]; then
|
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 -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
|
cryptsetup luksOpen "${hdd}"2 "${luks_pv_name}" --key-file "${luks_key_file}" || exit 2
|
||||||
pvcreate /dev/mapper/"${luks_pv_name}" || exit 3
|
pvcreate /dev/mapper/"${luks_pv_name}" || exit 3
|
||||||
|
|
|
@ -34,7 +34,7 @@ fi
|
||||||
## Open LUKS system {{{
|
## Open LUKS system {{{
|
||||||
if [ "${manage_luks}" -eq 0 ]; then
|
if [ "${manage_luks}" -eq 0 ]; then
|
||||||
### Put passphrase in a keyfile for multiple usage
|
### 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 the volume is not already opened
|
||||||
if [ ! -h /dev/mapper/"${luks_pv_name}" ]; then
|
if [ ! -h /dev/mapper/"${luks_pv_name}" ]; then
|
||||||
### Open LUKS system
|
### Open LUKS system
|
||||||
|
|
Loading…
Reference in New Issue