1 |
commit: 203500a030b608538b15a4a8094de680e1937266 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 5 23:19:34 2021 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 5 23:40:52 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=203500a0 |
7 |
|
8 |
initrd.scripts: openLUKS(): Reset cryptsetup_options on each iteration |
9 |
|
10 |
Fixes: a0a6d631 ("linuxrc: add kernel command-line argument to allow user to pass additional options to cryptsetup") |
11 |
Bug: https://bugs.gentoo.org/794817 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
defaults/initrd.scripts | 6 ++++-- |
15 |
defaults/unlock-luks.sh | 4 ++++ |
16 |
2 files changed, 8 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts |
19 |
index 5ec8adb..cdee2a4 100644 |
20 |
--- a/defaults/initrd.scripts |
21 |
+++ b/defaults/initrd.scripts |
22 |
@@ -1831,8 +1831,6 @@ openLUKS() { |
23 |
eval local LUKS_KEY='"${CRYPT_'${TYPE}'_KEY}"' |
24 |
eval local LUKS_KEYDEV='"${CRYPT_'${TYPE}'_KEYDEV}"' |
25 |
eval local LUKS_KEYDEV_FSTYPE='"${CRYPT_'${TYPE}'_KEYDEV_FSTYPE}"' |
26 |
- eval local cryptsetup_options='"${CRYPT_'${TYPE}'_OPTIONS}"' |
27 |
- cryptsetup_options="$(trim "${cryptsetup_options}")" |
28 |
eval local OPENED_LOCKFILE='"${CRYPT_'${TYPE}'_OPENED_LOCKFILE}"' |
29 |
local DEV_ERROR=0 KEY_ERROR=0 KEYDEV_ERROR=0 |
30 |
local mntkey="/mnt/key/" crypt_filter_ret= |
31 |
@@ -1845,6 +1843,10 @@ openLUKS() { |
32 |
|
33 |
while true |
34 |
do |
35 |
+ # Reset cryptsetup_options on each iteration |
36 |
+ eval local cryptsetup_options='"${CRYPT_'${TYPE}'_OPTIONS}"' |
37 |
+ cryptsetup_options="$(trim "${cryptsetup_options}")" |
38 |
+ |
39 |
local gpg_cmd="" |
40 |
if [ -e "${OPENED_LOCKFILE}" ] |
41 |
then |
42 |
|
43 |
diff --git a/defaults/unlock-luks.sh b/defaults/unlock-luks.sh |
44 |
index 2674d93..54ed1a0 100644 |
45 |
--- a/defaults/unlock-luks.sh |
46 |
+++ b/defaults/unlock-luks.sh |
47 |
@@ -58,6 +58,10 @@ main() { |
48 |
|
49 |
while true |
50 |
do |
51 |
+ # Reset cryptsetup_options on each iteration |
52 |
+ eval local cryptsetup_options='"${CRYPT_'${TYPE}'_OPTIONS}"' |
53 |
+ cryptsetup_options="$(trim "${cryptsetup_options}")" |
54 |
+ |
55 |
local gpg_cmd crypt_filter_ret |
56 |
|
57 |
if [ -e "${OPENED_LOCKFILE}" ] |