aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/classes
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2012-02-16 02:02:59 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-02-23 16:46:31 +0100
commit450417617adf21de5ba01a06294515a51939ea75 (patch)
tree89c0a6c3fe118a65889c3d9f825484e5d3bc06c4 /meta-oe/classes
parent71f61f799c3102680f6b78179c1b1d6b837ed8b4 (diff)
downloadmeta-openembedded-450417617adf21de5ba01a06294515a51939ea75.tar.gz
systemd.bbclass: automatically install all *.service and *.socket supplied in recipe's SRC_URI
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/classes')
-rw-r--r--meta-oe/classes/systemd.bbclass11
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() {
systemd_after_parse(d)
}
+# automatically install all *.service and *.socket supplied in recipe's SRC_URI
+do_install_append() {
+ install -d ${D}${systemd_unitdir}/system
+ for service in `find ${WORKDIR} -maxdepth 1 -name '*.service' -o -name '*.socket'` ; do
+ # ensure installing systemd-files only (e.g not avahi *.service)
+ if grep -q '\[Unit\]' $service ; then
+ install -m 644 $service ${D}${systemd_unitdir}/system
+ fi
+ done
+}
+
python populate_packages_prepend () {
def systemd_generate_package_scripts(pkg):
bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)