Don't access GENTOO_INSTALL_ENCRYPTION_KEY when not using zfs encryption.
This commit is contained in:
parent
b51f8daae9
commit
a25a696ced
|
@ -437,12 +437,15 @@ function format_zfs_standard() {
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local zfs_stdin
|
||||||
if [[ "$encrypt" == true ]]; then
|
if [[ "$encrypt" == true ]]; then
|
||||||
extra_args+=(
|
extra_args+=(
|
||||||
"-O" "encryption=aes-256-gcm"
|
"-O" "encryption=aes-256-gcm"
|
||||||
"-O" "keyformat=passphrase"
|
"-O" "keyformat=passphrase"
|
||||||
"-O" "keylocation=prompt"
|
"-O" "keylocation=prompt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
zfs_stdin="$GENTOO_INSTALL_ENCRYPTION_KEY"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# dnodesize=legacy might be needed for GRUB2, but auto is preferred for xattr=sa.
|
# dnodesize=legacy might be needed for GRUB2, but auto is preferred for xattr=sa.
|
||||||
|
@ -459,7 +462,7 @@ function format_zfs_standard() {
|
||||||
"${extra_args[@]}" \
|
"${extra_args[@]}" \
|
||||||
rpool \
|
rpool \
|
||||||
"${devices[@]}" \
|
"${devices[@]}" \
|
||||||
<<< "$GENTOO_INSTALL_ENCRYPTION_KEY" \
|
<<< "$zfs_stdin" \
|
||||||
|| die "Could not create zfs pool on $devices_desc"
|
|| die "Could not create zfs pool on $devices_desc"
|
||||||
|
|
||||||
zfs create rpool/ROOT \
|
zfs create rpool/ROOT \
|
||||||
|
|
Loading…
Reference in New Issue