Fixed old use of $id in disk_create_luks
This commit is contained in:
parent
1c476cef17
commit
e1fc6cf9eb
|
@ -250,10 +250,10 @@ disk_create_luks() {
|
||||||
|
|
||||||
local uuid="${DISK_ID_TO_UUID[$new_id]}"
|
local uuid="${DISK_ID_TO_UUID[$new_id]}"
|
||||||
|
|
||||||
einfo "Creating luks ($new_id) on $device ($id)"
|
einfo "Creating luks ($new_id) on $device_desc"
|
||||||
local keyfile
|
local keyfile
|
||||||
keyfile="$(luks_getkeyfile "$new_id")" \
|
keyfile="$(luks_getkeyfile "$new_id")" \
|
||||||
|| die "Error in luks_getkeyfile for id=$id"
|
|| die "Error in luks_getkeyfile for $device_desc"
|
||||||
cryptsetup luksFormat \
|
cryptsetup luksFormat \
|
||||||
--type luks2 \
|
--type luks2 \
|
||||||
--uuid "$uuid" \
|
--uuid "$uuid" \
|
||||||
|
@ -265,7 +265,7 @@ disk_create_luks() {
|
||||||
--key-size 512 \
|
--key-size 512 \
|
||||||
--batch-mode \
|
--batch-mode \
|
||||||
"$device" \
|
"$device" \
|
||||||
|| die "Could not create luks on '$device' ($id)"
|
|| die "Could not create luks on $device_desc"
|
||||||
mkdir -p "$LUKS_HEADER_BACKUP_DIR" \
|
mkdir -p "$LUKS_HEADER_BACKUP_DIR" \
|
||||||
|| die "Could not create luks header backup dir '$LUKS_HEADER_BACKUP_DIR'"
|
|| die "Could not create luks header backup dir '$LUKS_HEADER_BACKUP_DIR'"
|
||||||
local header_file="$LUKS_HEADER_BACKUP_DIR/luks-header-$id-${uuid,,}.img"
|
local header_file="$LUKS_HEADER_BACKUP_DIR/luks-header-$id-${uuid,,}.img"
|
||||||
|
@ -274,11 +274,11 @@ disk_create_luks() {
|
||||||
|| die "Could not remove old luks header backup file '$header_file'"
|
|| die "Could not remove old luks header backup file '$header_file'"
|
||||||
cryptsetup luksHeaderBackup "$device" \
|
cryptsetup luksHeaderBackup "$device" \
|
||||||
--header-backup-file "$header_file" \
|
--header-backup-file "$header_file" \
|
||||||
|| die "Could not backup luks header on '$device' ($id)"
|
|| die "Could not backup luks header on $device_desc"
|
||||||
cryptsetup open --type luks2 \
|
cryptsetup open --type luks2 \
|
||||||
--key-file "$keyfile" \
|
--key-file "$keyfile" \
|
||||||
"$device" "$name" \
|
"$device" "$name" \
|
||||||
|| die "Could not open luks encrypted device '$device' ($id)"
|
|| die "Could not open luks encrypted device $device_desc"
|
||||||
}
|
}
|
||||||
|
|
||||||
disk_create_dummy() {
|
disk_create_dummy() {
|
||||||
|
|
Loading…
Reference in New Issue