forked from mirrors/nixpkgs
Merge pull request #50281 from dasJ/luks-checkexist
nixos/luksroot: Check whether the device already exists
This commit is contained in:
commit
3fbdd4705a
|
@ -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