diff options
-rwxr-xr-x | meta/recipes-core/systemd/systemd-systemctl/systemctl | 9 |
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 b45a2dc2f7..514f747fe6 100755 --- a/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl | |||
@@ -201,13 +201,8 @@ class SystemdUnit(): | |||
201 | target = ROOT / location.relative_to(self.root) | 201 | target = ROOT / location.relative_to(self.root) |
202 | try: | 202 | try: |
203 | for dependent in config.get('Install', prop): | 203 | for dependent in config.get('Install', prop): |
204 | # determine whether or not dependent is a template with an actual | 204 | # expand any %i to instance (ignoring escape sequence %%) |
205 | # instance (i.e. a '@%i') | 205 | dependent = re.sub("([^%](%%)*)%i", "\\1{}".format(instance), dependent) |
206 | dependent_is_template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", dependent) | ||
207 | if dependent_is_template: | ||
208 | # if so, replace with the actual instance to achieve | ||
209 | # svc-wants@a.service.wants/svc-wanted-by@a.service | ||
210 | dependent = re.sub(dependent_is_template.group('instance'), instance, dependent, 1) | ||
211 | wants = systemdir / "{}.{}".format(dependent, dirstem) / service | 206 | wants = systemdir / "{}.{}".format(dependent, dirstem) / service |
212 | add_link(wants, target) | 207 | add_link(wants, target) |
213 | 208 | ||