main/postmarketos-initramfs: hide cryptsetup not found error (MR 4204)

Hides this error when FDE is *not* enabled, and ultimately skips the
block of logic for detecting the luks partition:
        /init: line 437: cryptsetup: not found

This error has confused some users in the past, who were reporting
issues with the initramfs.

There's probably a minor speedup on non-FDE systems as well from
bailing early.
This commit is contained in:
Clayton Craft 2023-08-23 15:39:45 -07:00 committed by Caleb Connolly
parent cfed09ca36
commit 20e4eb495d
No known key found for this signature in database
GPG key ID: 7A342565FF635F79

View file

@ -429,6 +429,7 @@ resize_root_partition() {
}
unlock_root_partition() {
command -v cryptsetup >/dev/null || return
partition="$(find_root_partition)"
if cryptsetup isLuks "$partition"; then
# Make sure the splash doesn't interfere