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

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=