systemd-hwdb: convert to VERB_COMMAND and add --introspect-cli
The custom help() is replaced by a COMMAND() description, and --introspect-cli is added.
This commit is contained in:
@@ -17,6 +17,7 @@ INTROSPECTABLE=(
|
||||
systemd-backlight
|
||||
systemd-dissect
|
||||
systemd-firstboot
|
||||
systemd-hwdb
|
||||
systemd-id128
|
||||
systemd-notify
|
||||
systemd-veritysetup
|
||||
@@ -36,6 +37,12 @@ for i in "${INTROSPECTABLE[@]}"; do
|
||||
$i --intro | grep -e --help
|
||||
done
|
||||
|
||||
# systemd-hwdb defines verbs, check that they are described
|
||||
if command -v systemd-hwdb >/dev/null; then
|
||||
systemd-hwdb --introspect-cli | jq -e \
|
||||
'.commands[0].verbs | map(.names[0]) | contains(["query", "update"])'
|
||||
fi
|
||||
|
||||
# systemd-id128 defines verbs, check that they are described
|
||||
systemd-id128 --introspect-cli | jq -e \
|
||||
'.commands[0].verbs | map(.names[0]) | contains(["new", "machine-id", "show", "help"])'
|
||||
|
||||
Reference in New Issue
Block a user