summaryrefslogtreecommitdiff
path: root/src/core/load-dropin.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-12-21 16:09:35 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-01-10 14:31:01 +0100
commit1bf15585521c4d23735f340215331cc333ec3a98 (patch)
tree21f463d897baf6efde96dc18c99a03465278b327 /src/core/load-dropin.c
parent3f57bc2267e09c09c9f11cb0d104ee87267e452b (diff)
downloadsystemd-1bf15585521c4d23735f340215331cc333ec3a98.tar.gz
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.
Diffstat (limited to 'src/core/load-dropin.c')
-rw-r--r--src/core/load-dropin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c
index 492e816e91..f61e9da6f2 100644
--- a/src/core/load-dropin.c
+++ b/src/core/load-dropin.c
@@ -65,7 +65,7 @@ static int process_deps(Unit *u, UnitDependency dependency, const char *dir_suff
/* We don't treat this as an error, especially because we didn't check this for a
* long time. Nevertheless, we warn, because such mismatch can be mighty confusing. */
- r = unit_symlink_name_compatible(entry, basename(target));
+ r = unit_symlink_name_compatible(entry, basename(target), u->instance);
if (r < 0) {
log_unit_warning_errno(u, r, "Can't check if names %s and %s are compatible, ignoring: %m",
entry, basename(target));