sysusers: take configuration as positional arguments
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 29 Jan 2018 13:47:01 +0000 (14:47 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 2 Feb 2018 09:18:13 +0000 (10:18 +0100)
commit1b600bd522d2c01c493729cdda4bcc2e01203e98
treecc7d1ac9955d12f35bc9e3d47218b8718258de4e
parentd1e4b8fd963ba43190ec824a803819612ff80441
sysusers: take configuration as positional arguments

If the configuration is included in a script, this is more convient.
I thought it would be possible to use this for rpm scriptlets with
'%pre -p systemd-sysuser "..."', but apparently there is no way to pass
arguments to the executable ($1 is used for the package installation count).
But this functionality seems generally useful, e.g. for testing and one-off
scripts, so let's keep it.

There's a slight change in behaviour when files are given on the command line:
if we cannot parse them, error out instead of ignoring the failure. When trying
to parse all configuration files, we don't want to fail even if some config
files are broken, but when parsing a list of items specified explicitly, we
should.

v2:
- rename --direct to --inline
man/systemd-sysusers.xml
src/sysusers/sysusers.c