From d7b1b9a17287fd715772cbf5c2b8e1356759a8ea Mon Sep 17 00:00:00 2001 From: Li xin Date: Fri, 19 Jun 2015 10:38:44 +0800 Subject: openhpi: add systemd support add systemd service file openhpid.service Signed-off-by: Li Xin --- recipes-extended/openhpi/openhpi.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'recipes-extended/openhpi/openhpi.inc') diff --git a/recipes-extended/openhpi/openhpi.inc b/recipes-extended/openhpi/openhpi.inc index 29015c3..975b6ce 100644 --- a/recipes-extended/openhpi/openhpi.inc +++ b/recipes-extended/openhpi/openhpi.inc @@ -14,12 +14,23 @@ DEPENDS = " \ INC_PR = "r1" -inherit autotools gettext update-alternatives pkgconfig +inherit autotools gettext update-alternatives pkgconfig systemd PACKAGECONFIG ??= "net-snmp" PACKAGECONFIG[net-snmp] = "--with-net-snmp-config=${STAGING_BINDIR}/net-snmp-config,, net-snmp" +SYSTEMD_SERVICE_${PN} = "openhpid.service" +SYSTEMD_AUTO_ENABLE = "disable" + +do_install_append() { + install -d 777 ${D}/var/lib/openhpi + install -d ${D}/${systemd_unitdir}/system + install -m 644 ${WORKDIR}/openhpid.service ${D}/${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}/${systemd_unitdir}/system/openhpid.service + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}/${systemd_unitdir}/system/openhpid.service +} + FILES_${PN} += "${libdir}/${PN}/*" INSANE_SKIP_${PN} = "dev-so" -- cgit v1.2.3-54-g00ecf