summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Houben2017-08-28 13:01:39 +0200
committerJan Houben2017-08-28 13:01:39 +0200
commit10e770d47effbb0faf18b8add8b5600f7d9af271 (patch)
tree7fbb91dcd91731f77a88622b0b9c6dd1e5a05373
parent386d17653e1be685b8b992760bf8ebe01d88f43d (diff)
downloadaur-10e770d47effbb0faf18b8add8b5600f7d9af271.tar.gz
do no give up asking for passphrase
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--plymouth-zfs.initcpio.hook5
3 files changed, 8 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1481eed0f38..870a9b1ecb1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = plymouth-zfs
pkgdesc = initcpio hook to support native zfs encryption for plymouth
pkgver = 1
- pkgrel = 3
+ pkgrel = 4
install = plymouth-zfs.install
arch = any
license = MIT
@@ -14,7 +14,7 @@ pkgbase = plymouth-zfs
source = plymouth-zfs.initcpio.hook
source = plymouth-zfs.initcpio.install
source = plymouth-zfs.install
- sha256sums = 06688ac12efe795e0d8e6781507cb9fd2de094c753be93288e96963de75369a0
+ sha256sums = 01818d81516ccded400b313af6bd0f8a83f27cad622de36517d6cc7413bcd7ac
sha256sums = 830d5231b079d83860db7e7d63839e1ec7e163311ae7e9dcd46a8358fabaf9ad
sha256sums = 0910896056921ebedc1eb910d38b64d8815790f042cb3e9bc07a1a49e31e3b2b
diff --git a/PKGBUILD b/PKGBUILD
index 818bea057b8..a9705018d85 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=plymouth-zfs
pkgver=1
-pkgrel=3
+pkgrel=4
pkgdesc="initcpio hook to support native zfs encryption for plymouth"
arch=(any)
license=(MIT)
@@ -15,7 +15,7 @@ install=plymouth-zfs.install
source=("plymouth-zfs.initcpio.hook"
"plymouth-zfs.initcpio.install"
"plymouth-zfs.install")
-sha256sums=('06688ac12efe795e0d8e6781507cb9fd2de094c753be93288e96963de75369a0'
+sha256sums=('01818d81516ccded400b313af6bd0f8a83f27cad622de36517d6cc7413bcd7ac'
'830d5231b079d83860db7e7d63839e1ec7e163311ae7e9dcd46a8358fabaf9ad'
'0910896056921ebedc1eb910d38b64d8815790f042cb3e9bc07a1a49e31e3b2b')
diff --git a/plymouth-zfs.initcpio.hook b/plymouth-zfs.initcpio.hook
index d5950fcad04..e5afc140d36 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 () {