summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poky/meta/classes-recipe/systemd.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/poky/meta/classes-recipe/systemd.bbclass b/poky/meta/classes-recipe/systemd.bbclass
index 12c59647be..0e9f7cfa33 100644
--- a/poky/meta/classes-recipe/systemd.bbclass
+++ b/poky/meta/classes-recipe/systemd.bbclass
@@ -249,9 +249,12 @@ python systemd_populate_packages() {
(servicename, instance, service_type) = re.split('[@.]', service)
template_services.setdefault(servicename + '@.' + service_type, []).append(instance)
else:
- fd.write("%s %s\n" % (action,service))
+ template_services.setdefault(service, [])
for template, instances in template_services.items():
- fd.write("%s %s %s\n" % (action, template, ' '.join(instances)))
+ if instances:
+ fd.write("%s %s %s\n" % (action, template, ' '.join(instances)))
+ else:
+ fd.write("%s %s\n" % (action, template))
d.appendVar("FILES:%s" % pkg, ' ' + oe.path.join(d.getVar("systemd_unitdir"), "%s-preset/98-%s.preset" % (prefix, pkg)))
# Run all modifications once when creating package