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.
This commit is contained in:
@@ -4,7 +4,7 @@ templates = [
|
||||
dest = "/etc/sysusers.d/nut.conf"
|
||||
hooks = {
|
||||
changed = [{
|
||||
run = "systemd-sysusers %s"
|
||||
run = "systemd-sysusers /etc/sysusers.d/nut.conf"
|
||||
immediate = True
|
||||
}]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user