various small fixes, fixes + fileSystems.*.postUnmountCommands

This commit is contained in:
Niklas Gollenstede
2024-02-01 13:30:57 +01:00
parent 4b31e64901
commit 2bce37a185
9 changed files with 73 additions and 48 deletions

View File

@ -212,6 +212,7 @@ function mount-keystore-luks-primary {
local method=@{config.setup.keystore.keys[$usage]%%=*}
local options=@{config.setup.keystore.keys[$usage]:$(( ${#method} + 1 ))}
echo 'Opening keystore with primary key (this may cause prompts, but no new keys are written):'
local attempt ; for attempt in 2 3 x ; do
if mount-keystore-luks --key-file=<( gen-key-"$method" "$usage" "$options" ) ; then break ; fi
if [[ $attempt == x ]] ; then \return 1 ; fi ; echo "Retrying ($attempt/3):"