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() {
|
do_open_passphrase() {
|
||||||
local passphrase
|
local passphrase
|
||||||
|
|
||||||
|
# Return if already unlocked
|
||||||
|
if ! cryptsetup status "${name}" > /dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
echo -n "Passphrase for ${device}: "
|
echo -n "Passphrase for ${device}: "
|
||||||
passphrase=
|
passphrase=
|
||||||
|
|
Loading…
Reference in a new issue