diff options
author | Li xin <lixin.fnst@cn.fujitsu.com> | 2015-06-19 10:38:44 +0800 |
---|---|---|
committer | João Henrique Ferreira de Freitas <joaohf@gmail.com> | 2015-06-22 21:48:43 -0300 |
commit | d7b1b9a17287fd715772cbf5c2b8e1356759a8ea (patch) | |
tree | 06997e80050ba5ecbb0feab6e96c9db6f481461d | |
parent | 83b1f76a75266743dc9eb0238039d5b973ad8ac0 (diff) | |
download | meta-openclovis-d7b1b9a17287fd715772cbf5c2b8e1356759a8ea.tar.gz |
openhpi: add systemd support
add systemd service file openhpid.service
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
-rw-r--r-- | recipes-extended/openhpi/files/openhpid.service | 11 | ||||
-rw-r--r-- | recipes-extended/openhpi/openhpi.inc | 13 | ||||
-rw-r--r-- | recipes-extended/openhpi/openhpi_3.0.0.bb | 1 |
3 files changed, 24 insertions, 1 deletions
diff --git a/recipes-extended/openhpi/files/openhpid.service b/recipes-extended/openhpi/files/openhpid.service new file mode 100644 index 0000000..a74713a --- /dev/null +++ b/recipes-extended/openhpi/files/openhpid.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=OpenHPI daemon | ||
3 | After=syslog.target | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | ExecStart=@SBINDIR@/openhpid -c @SYSCONFDIR@/openhpi/openhpi.conf | ||
8 | RemainAfterExit=yes | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
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 = " \ | |||
14 | 14 | ||
15 | INC_PR = "r1" | 15 | INC_PR = "r1" |
16 | 16 | ||
17 | inherit autotools gettext update-alternatives pkgconfig | 17 | inherit autotools gettext update-alternatives pkgconfig systemd |
18 | 18 | ||
19 | PACKAGECONFIG ??= "net-snmp" | 19 | PACKAGECONFIG ??= "net-snmp" |
20 | 20 | ||
21 | PACKAGECONFIG[net-snmp] = "--with-net-snmp-config=${STAGING_BINDIR}/net-snmp-config,, net-snmp" | 21 | PACKAGECONFIG[net-snmp] = "--with-net-snmp-config=${STAGING_BINDIR}/net-snmp-config,, net-snmp" |
22 | 22 | ||
23 | SYSTEMD_SERVICE_${PN} = "openhpid.service" | ||
24 | SYSTEMD_AUTO_ENABLE = "disable" | ||
25 | |||
26 | do_install_append() { | ||
27 | install -d 777 ${D}/var/lib/openhpi | ||
28 | install -d ${D}/${systemd_unitdir}/system | ||
29 | install -m 644 ${WORKDIR}/openhpid.service ${D}/${systemd_unitdir}/system | ||
30 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}/${systemd_unitdir}/system/openhpid.service | ||
31 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}/${systemd_unitdir}/system/openhpid.service | ||
32 | } | ||
33 | |||
23 | FILES_${PN} += "${libdir}/${PN}/*" | 34 | FILES_${PN} += "${libdir}/${PN}/*" |
24 | 35 | ||
25 | INSANE_SKIP_${PN} = "dev-so" | 36 | INSANE_SKIP_${PN} = "dev-so" |
diff --git a/recipes-extended/openhpi/openhpi_3.0.0.bb b/recipes-extended/openhpi/openhpi_3.0.0.bb index b6a3509..fffead3 100644 --- a/recipes-extended/openhpi/openhpi_3.0.0.bb +++ b/recipes-extended/openhpi/openhpi_3.0.0.bb | |||
@@ -4,6 +4,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/openhpi/openhpi-${PV}.tar.gz \ | |||
4 | file://openhpi_openclovis.patch \ | 4 | file://openhpi_openclovis.patch \ |
5 | file://my_changes.patch \ | 5 | file://my_changes.patch \ |
6 | file://xml.patch \ | 6 | file://xml.patch \ |
7 | file://openhpid.service \ | ||
7 | " | 8 | " |
8 | SRC_URI[md5sum] = "9089cb59b732ff00b3805a1809405b4b" | 9 | SRC_URI[md5sum] = "9089cb59b732ff00b3805a1809405b4b" |
9 | SRC_URI[sha256sum] = "2af5f40040a1b99b0c0a60f1bc03505d3d51f5c445cd04b1f832eb060acbb227" | 10 | SRC_URI[sha256sum] = "2af5f40040a1b99b0c0a60f1bc03505d3d51f5c445cd04b1f832eb060acbb227" |