It would help a lot if at least --sb-state, --test-key and --import return a code value for the outputs they have. When a machine wants to know the result it currently can only "parse" the stdout/stderr text, which can easily break if you localize it or change a single letter in it.
This request is related to this GNOME Software work; these three commands are currently used there, but extending this to other commands will surely be a plus.
The return code of the executable could be done only with an extra argument, otherwise keep the return value as is now. Something like mokutil --machine-readable --sb-state (where the --machine-readable is a bad name, there should be a fancier one for sure.
Alternatively, if you can ensure the text output as a (sort of) stable API, which will do not change in the future, neither will be localized or anything, then it can work for the time being as well.
It would help a lot if at least
--sb-state
,--test-key
and--import
return a code value for the outputs they have. When a machine wants to know the result it currently can only "parse" the stdout/stderr text, which can easily break if you localize it or change a single letter in it.This request is related to this GNOME Software work; these three commands are currently used there, but extending this to other commands will surely be a plus.
The return code of the executable could be done only with an extra argument, otherwise keep the return value as is now. Something like
mokutil --machine-readable --sb-state
(where the--machine-readable
is a bad name, there should be a fancier one for sure.Alternatively, if you can ensure the text output as a (sort of) stable API, which will do not change in the future, neither will be localized or anything, then it can work for the time being as well.