This helper splits out a templated filename into the base template and
the instance name. This will be used later.
Signed-off-by: Alexander Larsson <alexl@redhat.com>
Remove all trailing white spaces from all lines before the line by line
processing
Add test
Exclude the unit file used for the test from whitespace check
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
For a source file like `foo.container`, look for drop in named
`foo.container.d/*.conf` and merged them into the main file. The
dropins are applied in alphabetical order, and files in earlier
diretories override later files with same name.
This is similar to how systemd dropins work, see:
https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html
Also adds some tests for these
Signed-off-by: Alexander Larsson <alexl@redhat.com>
We add a regular LookupBoolean that can fail lookups, which is used by
the WithDefault version. We want to use this directly later in some places.
It is fina to change API here because this has not been in a release yet.
Signed-off-by: Alexander Larsson <alexl@redhat.com>
Reduce the number of top-level packages in ./pkg by moving quadlet
packages under ./pkg/systemd.
[NO NEW TESTS NEEDED] - no functional change.
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>