]> git.ipfire.org Git - thirdparty/grub.git/commit
tests/util/grub-shell-luks-tester: Fix detached header test getting wrong header...
authorGlenn Washburn <development@efficientek.com>
Sun, 9 Jun 2024 04:22:05 +0000 (23:22 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 20 Jun 2024 13:14:20 +0000 (15:14 +0200)
commitc1ee4da6a9e58a292cc479702439115f837b08fd
treebda438947896391f27aeb60d91d2be978d3ebc92
parentc22e052fe2faa177c0f8316cc9d72ed6e2496e36
tests/util/grub-shell-luks-tester: Fix detached header test getting wrong header path

When $detached_header was set 1, $luksdiskfile was set to the LUKS header
file path with "${detached_header:-$luksfile}" appended, which evaluates
to "1". Fix this by using two statements to set $luksdiskfile. The first
sets it to the header file if $detached_header is set, otherwise leave it
unset. The second statement sets it to itself if it is already set,
otherwise it is set to $luksfile.

Fixes: a7b540e6e (tests: Add cryptomount functional test)
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
tests/util/grub-shell-luks-tester.in