Merge pull request #50281 from dasJ/luks-checkexist

nixos/luksroot: Check whether the device already exists
This commit is contained in:
Silvan Mosberger 2018-12-02 00:28:13 +01:00 committed by GitHub
commit 3fbdd4705a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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=