diff options
author | Jan Houben | 2017-08-28 13:01:39 +0200 |
---|---|---|
committer | Jan Houben | 2017-08-28 13:01:39 +0200 |
commit | 10e770d47effbb0faf18b8add8b5600f7d9af271 (patch) | |
tree | 7fbb91dcd91731f77a88622b0b9c6dd1e5a05373 /plymouth-zfs.initcpio.hook | |
parent | 386d17653e1be685b8b992760bf8ebe01d88f43d (diff) | |
download | aur-10e770d47effbb0faf18b8add8b5600f7d9af271.tar.gz |
do no give up asking for passphrase
Diffstat (limited to 'plymouth-zfs.initcpio.hook')
-rw-r--r-- | plymouth-zfs.initcpio.hook | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plymouth-zfs.initcpio.hook b/plymouth-zfs.initcpio.hook index d5950fcad04b..e5afc140d368 100644 --- a/plymouth-zfs.initcpio.hook +++ b/plymouth-zfs.initcpio.hook @@ -38,10 +38,13 @@ zfs_decrypt_fs() { encryptionroot=$(zfs get -H -o value encryptionroot "${dataset}") # check if key is already loaded - [ "$(zfs get -H -o value encryption "${dataset}")" != "available" ] || return 0 + [ "$(zfs get -H -o value keystatus "${dataset}")" != "available" ] || return 0 # finally load the key plymouth ask-for-password --prompt="Password for ${dataset} dataset" --dont-pause-progress --number-of-tries=5 --command="zfs load-key ${encryptionroot}" + + # retry if key wasn't loaded + [ "$(zfs get -H -o value keystatus "${dataset}")" != "available" ] && zfs_decrypt_fs "${dataset}" } zfs_mount_handler () { |