]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/install.c
core,install: allow one more case of "instance propagation"
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 21 Dec 2019 15:09:35 +0000 (16:09 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 10 Jan 2020 13:31:01 +0000 (14:31 +0100)
commit1bf15585521c4d23735f340215331cc333ec3a98
tree21f463d897baf6efde96dc18c99a03465278b327
parent3f57bc2267e09c09c9f11cb0d104ee87267e452b
core,install: allow one more case of "instance propagation"

If we have a template unit template@.service, it should be allowed to specify a
dependency on a unit without an instance, bar@.service. When the unit is created,
the instance will be propagated into the target, so template@inst.service will
depend on bar@inst.service.

This commit changes unit_dependency_name_compatible(), which makes the manager
accept links like that, and unit_file_verify_alias(), so that the installation
function will agree to create a symlink like that, and finally the tests are
adjusted to pass.
src/core/load-dropin.c
src/shared/install.c
src/shared/unit-file.c
src/shared/unit-file.h
src/test/test-install-root.c