diff options
| -rw-r--r-- | meta-oe/classes/systemd.bbclass | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass index e779bef292..b2d4191d12 100644 --- a/meta-oe/classes/systemd.bbclass +++ b/meta-oe/classes/systemd.bbclass | |||
| @@ -80,6 +80,17 @@ python __anonymous() { | |||
| 80 | systemd_after_parse(d) | 80 | systemd_after_parse(d) |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | # automatically install all *.service and *.socket supplied in recipe's SRC_URI | ||
| 84 | do_install_append() { | ||
| 85 | install -d ${D}${systemd_unitdir}/system | ||
| 86 | for service in `find ${WORKDIR} -maxdepth 1 -name '*.service' -o -name '*.socket'` ; do | ||
| 87 | # ensure installing systemd-files only (e.g not avahi *.service) | ||
| 88 | if grep -q '\[Unit\]' $service ; then | ||
| 89 | install -m 644 $service ${D}${systemd_unitdir}/system | ||
| 90 | fi | ||
| 91 | done | ||
| 92 | } | ||
| 93 | |||
| 83 | python populate_packages_prepend () { | 94 | python populate_packages_prepend () { |
| 84 | def systemd_generate_package_scripts(pkg): | 95 | def systemd_generate_package_scripts(pkg): |
| 85 | bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg) | 96 | bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg) |
