summaryrefslogtreecommitdiff
path: root/meta/recipes-extended/sysstat/sysstat.inc
diff options
context:
space:
mode:
authorLi xin <lixin.fnst@cn.fujitsu.com>2015-06-12 14:13:40 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-02 23:46:08 +0100
commit3278af2266a078351a4f614c79bfbea2514566a1 (patch)
tree897263dc637f077394885140ff287a44b9fe1273 /meta/recipes-extended/sysstat/sysstat.inc
parent5d8f865d34aef6fb821e025da56a0a3c0656c49d (diff)
downloadopenembedded-core-3278af2266a078351a4f614c79bfbea2514566a1.tar.gz
openembedded-core-3278af2266a078351a4f614c79bfbea2514566a1.tar.bz2
openembedded-core-3278af2266a078351a4f614c79bfbea2514566a1.zip
sysstat: add systemd service files
Add sysstat.service to support systemd systems. Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/sysstat/sysstat.inc')
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index 40630070d8..5c761fa693 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -6,15 +6,20 @@ SECTION = "console/utils"
SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \
file://99_sysstat \
+ file://sysstat.service \
"
DEPENDS += "base-passwd"
-inherit autotools-brokensep gettext
+inherit autotools-brokensep gettext systemd
EXTRA_OECONF += "--disable-sensors"
EXTRA_OEMAKE += 'LFLAGS=""'
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "sysstat.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
do_configure_prepend() {
export sa_lib_dir=${libdir}/sa
}
@@ -27,6 +32,10 @@ do_install() {
rm -rf ${D}/var
install -d ${D}/etc/default/volatiles
install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
+ sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
}
pkg_postinst_${PN} () {