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:
Zbigniew Jędrzejewski-Szmek
2026-08-15 15:25:23 +02:00
parent ba76d38f37
commit 7027ca6ee4
2 changed files with 20 additions and 50 deletions
@@ -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"])'