diff options
Diffstat (limited to 'meta/classes/systemd.bbclass')
-rw-r--r-- | meta/classes/systemd.bbclass | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass index 46e72c7a4a..db7873fbe2 100644 --- a/meta/classes/systemd.bbclass +++ b/meta/classes/systemd.bbclass | |||
@@ -59,6 +59,8 @@ systemd_populate_packages[vardepsexclude] += "OVERRIDES" | |||
59 | 59 | ||
60 | 60 | ||
61 | python systemd_populate_packages() { | 61 | python systemd_populate_packages() { |
62 | import re | ||
63 | |||
62 | if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): | 64 | if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): |
63 | return | 65 | return |
64 | 66 | ||
@@ -144,10 +146,22 @@ python systemd_populate_packages() { | |||
144 | for pkg_systemd in systemd_packages.split(): | 146 | for pkg_systemd in systemd_packages.split(): |
145 | for service in get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd).split(): | 147 | for service in get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd).split(): |
146 | path_found = '' | 148 | path_found = '' |
149 | |||
150 | # Deal with adding, for example, 'ifplugd@eth0.service' from | ||
151 | # 'ifplugd@.service' | ||
152 | base = None | ||
153 | if service.find('@') != -1: | ||
154 | base = re.sub('@[^.]+.', '@.', service) | ||
155 | |||
147 | for path in searchpaths: | 156 | for path in searchpaths: |
148 | if os.path.exists(oe.path.join(d.getVar("D", True), path, service)): | 157 | if os.path.exists(oe.path.join(d.getVar("D", True), path, service)): |
149 | path_found = path | 158 | path_found = path |
150 | break | 159 | break |
160 | elif base is not None: | ||
161 | if os.path.exists(oe.path.join(d.getVar("D", True), path, base)): | ||
162 | path_found = path | ||
163 | break | ||
164 | |||
151 | if path_found != '': | 165 | if path_found != '': |
152 | systemd_add_files_and_parse(pkg_systemd, path_found, service, keys) | 166 | systemd_add_files_and_parse(pkg_systemd, path_found, service, keys) |
153 | else: | 167 | else: |