Describe the program with COMMAND() and parse the command line with the
shared helper, which adds -h/--help, --version, and --introspect-cli. The
optional namespace argument is unchanged. Superfluous arguments are now
rejected with "Too many arguments." instead of "This program takes one or
no arguments.".
The template unit is adjusted to use '-- %i' to pass the namespace name.
I'm not convinced that using a namespace name starting with a dash is a
good idea, but using '--' to disambiguate seems good in any case, so let's
do that. We might want to adjust log_namespace_name_valid() separately.
The service deos not have DefaultDependencies=no. Hence it has dependencies
of shutdown.target, and dependencies of soft-reboot.target are not
necessary.
Follow-up for f89985ca49.
We don't need two (and half) templating systems anymore, yay!
I'm keeping the changes minimal, to make the diff manageable. Some enhancements
due to a better templating system might be possible in the future.
For handling of '## ' — see the next commit.
If we have exit on idle, then operations such as "journalctl
--namespace=foo --rotate" should work even if the journal daemon is
currently not running.
(Note that we don't do activation by varlink for the main instance of
journald, I am not sure the deadlocks it might introduce are worth it)