nixos/luksroot: sync the crypt-storage

Add a sync command just after writing to the /crypt-storage file in order to reduce
the possibilities of corruption errors.
This commit is contained in:
Hugo Lageneste 2021-03-08 21:17:42 +01:00 committed by Artturin
parent 37a9affe1b
commit e09fb63ffc

View File

@ -332,6 +332,7 @@ let
if [ $? == 0 ]; then
echo -ne "$new_salt\n$new_iterations" > /crypt-storage${dev.yubikey.storage.path}
sync /crypt-storage${dev.yubikey.storage.path}
else
echo "Warning: Could not update LUKS key, current challenge persists!"
fi