clevis
clevis copied to clipboard
return 0/return 1 switched in scripts/local-top/clevis.in
Hi,
Running Ubuntu 20.04 on a luks2-encrypted ZFS mirror root pool and made some debugging of scripts/local-top/clevis.in to discover the bug that prevented unlocking of multiple devices in initramfs (that I later noticed you have already fixed in version 17). However I found another bug during the investigation. In the functions luks1_decrypt and luks2_decrypt, "return 0" and "return 1" have been mixed up. When a device is unlocked, it will now return 0 which will make the calling if-statement jump to the "else" block. I have discovered this by testing with debug prints.
The consequence of this bug seem minor, inducing a "sleep 5" between each unlock that probably isn't necessary. I tested correcting the bug and it worked for me.
Regards, Niclas
Hello @brydling. Thanks for commenting the issue.
Can you please upload a PR with the correcting bug associated to this issue?
Hello @sarroutbi there is already a pull request for that at https://github.com/latchset/clevis/pull/326