mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 14:03:28 +01:00
luks: fix interactive mount
Before that it was only attempted to unlock luks with the key from `$password`, however that variable didn't exist before.
This commit is contained in:
1 parent
3c41ae36ff
commit
e738cac18e
1 file changed
+7
@@ -137,6 +137,13 @@ in
|
|||||||
{
|
{
|
||||||
dev = ''
|
dev = ''
|
||||||
if ! cryptsetup status ${config.name} >/dev/null 2>/dev/null; then
|
if ! cryptsetup status ${config.name} >/dev/null 2>/dev/null; then
|
||||||
|
${lib.optionalString config.askPassword ''
|
||||||
|
set +x
|
||||||
|
echo "Enter password for ${config.device}"
|
||||||
|
read -s password
|
||||||
|
export password
|
||||||
|
set -x
|
||||||
|
''}
|
||||||
cryptsetup open ${config.device} ${config.name} \
|
cryptsetup open ${config.device} ${config.name} \
|
||||||
${keyFileArgs}
|
${keyFileArgs}
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user