core: convert to VERB_COMMAND and add --introspect-cli

--introspect-cli follows the same deferred pattern as --help: parse_argv()
only records the action, and it is executed in the same place where
ACTION_HELP and ACTION_VERSION are handled.

The help is looked up by explicit name: in the multicall configuration
the systemd and systemd-executor commands share one binary, so the
"first COMMAND" default would depend on link order.

The "This program takes no positional arguments." line is dropped from
the help output — the default "[OPTION…]" synopsis already says so.
(And also, this is not quite true. It does take positional args when
called as init.)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-08-26 12:22:15 +02:00
parent 044ebd7e54
commit 4f2b0e977c
4 changed files with 32 additions and 27 deletions
+1
View File
@@ -37,6 +37,7 @@ int proc_cmdline_filter_pid1_args(char **argv, char ***ret) {
{ "no-pager", no_argument, },
{ "help", no_argument, },
{ "version", no_argument, },
{ "introspect-cli", no_argument, },
{ "dump-configuration-items", no_argument, },
{ "dump-bus-properties", no_argument, },
{ "bus-introspect", required_argument },