diff options
author | Hugo Lageneste <hugo.lageneste@pm.me> | 2021-03-08 21:17:42 +0100 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2021-10-20 03:46:19 +0300 |
commit | e09fb63ffc96b5f600c400366ffbb5db562da5c7 (patch) | |
tree | be3c738fc49e0cd034242aee9178b2208052d391 /nixos/modules/system/boot | |
parent | 37a9affe1bae825ab230e8ed197d0f4af0f11fb1 (diff) | |
download | nixpkgs-e09fb63ffc96b5f600c400366ffbb5db562da5c7.tar nixpkgs-e09fb63ffc96b5f600c400366ffbb5db562da5c7.tar.gz nixpkgs-e09fb63ffc96b5f600c400366ffbb5db562da5c7.tar.bz2 nixpkgs-e09fb63ffc96b5f600c400366ffbb5db562da5c7.tar.lz nixpkgs-e09fb63ffc96b5f600c400366ffbb5db562da5c7.tar.xz nixpkgs-e09fb63ffc96b5f600c400366ffbb5db562da5c7.tar.zst nixpkgs-e09fb63ffc96b5f600c400366ffbb5db562da5c7.zip |
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.
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r-- | nixos/modules/system/boot/luksroot.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index fb5269e43d0..f0d3170dc5a 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -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 |