Change invocation of mokutil to return 0 on success

Some versions of mokutil have an exit code of -1 when invoked without
arguments, which causes the check for mokutil to fail and subsequent
re-installation of required tools, regardless of whether they are
already installed or not.
Invoking mokutil with --version also results in an exit code of -1. This
seems to have been fixed in (at least) mokutil 0.7.0.
This commit is contained in:
Hannes Weisbach
2025-01-25 20:07:19 +01:00
parent 9784f3c138
commit 35b79247d7

View File

@@ -143,7 +143,7 @@ check_required_packages() {
;;
mokutil)
if ! mokutil &>/dev/null; then
if ! mokutil --list-enrolled &>/dev/null; then
echo -e "${RED}The required command (${cmd}) is not available!${NOCOLOR}"
MISSING_COMMANDS+=("$cmd")
else