nut: Pass explicit path to systemd-sysusers

When `tmpl` substitutes the path of the generated file for `%s` in hook
commands, it uses the full path including the `destdir` prefix.  Since
we're running `tmpl` inside a container, but `systemd-sysusers` outside
it (via `nsenter -t 1`), that path is not correct.  Thus, we need to
explicitly pass the path as `systemd-sysusers` will see it.
master
Dustin 2024-01-12 08:02:48 -06:00
parent 1d4d29c294
commit d44e7df8cf
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ templates = [
dest = "/etc/sysusers.d/nut.conf" dest = "/etc/sysusers.d/nut.conf"
hooks = { hooks = {
changed = [{ changed = [{
run = "systemd-sysusers %s" run = "systemd-sysusers /etc/sysusers.d/nut.conf"
immediate = True immediate = True
}] }]
} }