summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmeta/recipes-core/systemd/systemd-systemctl/systemctl9
1 files changed, 2 insertions, 7 deletions
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 1c87beadad..c8b5c9efe3 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -190,13 +190,8 @@ class SystemdUnit():
190 target = ROOT / location.relative_to(self.root) 190 target = ROOT / location.relative_to(self.root)
191 try: 191 try:
192 for dependent in config.get('Install', prop): 192 for dependent in config.get('Install', prop):
193 # determine whether or not dependent is a template with an actual 193 # expand any %i to instance (ignoring escape sequence %%)
194 # instance (i.e. a '@%i') 194 dependent = re.sub("([^%](%%)*)%i", "\\1{}".format(instance), dependent)
195 dependent_is_template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", dependent)
196 if dependent_is_template:
197 # if so, replace with the actual instance to achieve
198 # svc-wants@a.service.wants/svc-wanted-by@a.service
199 dependent = re.sub(dependent_is_template.group('instance'), instance, dependent, 1)
200 wants = systemdir / "{}.{}".format(dependent, dirstem) / service 195 wants = systemdir / "{}.{}".format(dependent, dirstem) / service
201 add_link(wants, target) 196 add_link(wants, target)
202 197