Merge pull request #50281 from dasJ/luks-checkexist
nixos/luksroot: Check whether the device already exists
This commit is contained in:
commit
3fbdd4705a
1 changed files with 5 additions and 0 deletions
|
@ -118,6 +118,11 @@ let
|
|||
do_open_passphrase() {
|
||||
local passphrase
|
||||
|
||||
# Return if already unlocked
|
||||
if ! cryptsetup status "${name}" > /dev/null; then
|
||||
return
|
||||
fi
|
||||
|
||||
while true; do
|
||||
echo -n "Passphrase for ${device}: "
|
||||
passphrase=
|
||||
|
|
Loading…
Reference in a new issue