core: support %j in unit dependency resolution

System Internals / systemd - Patrick Williams [stwcx.xyz] - 22 December 2018 08:21 EST

Commit 250e9fadbcc0ca90e697d7efb40855b054ed3b8f introduced support for %j/%J specifier in unit files. The function unit_name_printf is used in unit dependency resolution, such as Wants / After directives, but was missing support for the %j. Add to allow directives such as:

[Unit] Wants=bar-%j.target

Fixes: systemd/systemd#11217

8eab76680 core: support %j in unit dependency resolution
src/core/unit-printf.c | 1 +
test/TEST-28-PERCENTJ-WANTEDBY/Makefile | 9 +++++
test/TEST-28-PERCENTJ-WANTEDBY/test.sh | 68 +++++++++++++++++++++++++++++++++
3 files changed, 78 insertions(+)

Upstream: github.com


  • Share