diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes-recipe/systemd.bbclass | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/meta/classes-recipe/systemd.bbclass b/meta/classes-recipe/systemd.bbclass index 14fef2d7a6..a3c2c6eb20 100644 --- a/meta/classes-recipe/systemd.bbclass +++ b/meta/classes-recipe/systemd.bbclass | |||
| @@ -90,6 +90,18 @@ def systemd_service_path(service, searchpaths, d): | |||
| 90 | 90 | ||
| 91 | return path_found, base | 91 | return path_found, base |
| 92 | 92 | ||
| 93 | def systemd_service_searchpaths(user, d): | ||
| 94 | if user: | ||
| 95 | return [ | ||
| 96 | oe.path.join(d.getVar("sysconfdir"), "systemd", "user"), | ||
| 97 | d.getVar("systemd_user_unitdir"), | ||
| 98 | ] | ||
| 99 | else: | ||
| 100 | return [ | ||
| 101 | oe.path.join(d.getVar("sysconfdir"), "systemd", "system"), | ||
| 102 | d.getVar("systemd_system_unitdir"), | ||
| 103 | ] | ||
| 104 | |||
| 93 | python systemd_populate_packages() { | 105 | python systemd_populate_packages() { |
| 94 | import re | 106 | import re |
| 95 | import shlex | 107 | import shlex |
| @@ -169,12 +181,9 @@ python systemd_populate_packages() { | |||
| 169 | 181 | ||
| 170 | # Check service-files and call systemd_add_files_and_parse for each entry | 182 | # Check service-files and call systemd_add_files_and_parse for each entry |
| 171 | def systemd_check_services(): | 183 | def systemd_check_services(): |
| 172 | searchpaths = [ | 184 | searchpaths = systemd_service_searchpaths(False, d) |
| 173 | oe.path.join(d.getVar("sysconfdir"), "systemd", "system"), | 185 | searchpaths.extend(systemd_service_searchpaths(True, d)) |
| 174 | oe.path.join(d.getVar("sysconfdir"), "systemd", "user"), | 186 | |
| 175 | ] | ||
| 176 | searchpaths.append(d.getVar("systemd_system_unitdir")) | ||
| 177 | searchpaths.append(d.getVar("systemd_user_unitdir")) | ||
| 178 | systemd_packages = d.getVar('SYSTEMD_PACKAGES') | 187 | systemd_packages = d.getVar('SYSTEMD_PACKAGES') |
| 179 | 188 | ||
| 180 | # scan for all in SYSTEMD_SERVICE[] | 189 | # scan for all in SYSTEMD_SERVICE[] |
