summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc11
-rw-r--r--meta/recipes-extended/sysstat/sysstat/sysstat.service12
2 files changed, 22 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"
6 6
7SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \ 7SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \
8 file://99_sysstat \ 8 file://99_sysstat \
9 file://sysstat.service \
9 " 10 "
10 11
11DEPENDS += "base-passwd" 12DEPENDS += "base-passwd"
12 13
13inherit autotools-brokensep gettext 14inherit autotools-brokensep gettext systemd
14 15
15EXTRA_OECONF += "--disable-sensors" 16EXTRA_OECONF += "--disable-sensors"
16EXTRA_OEMAKE += 'LFLAGS=""' 17EXTRA_OEMAKE += 'LFLAGS=""'
17 18
19SYSTEMD_PACKAGES = "${PN}"
20SYSTEMD_SERVICE_${PN} = "sysstat.service"
21SYSTEMD_AUTO_ENABLE = "enable"
22
18do_configure_prepend() { 23do_configure_prepend() {
19 export sa_lib_dir=${libdir}/sa 24 export sa_lib_dir=${libdir}/sa
20} 25}
@@ -27,6 +32,10 @@ do_install() {
27 rm -rf ${D}/var 32 rm -rf ${D}/var
28 install -d ${D}/etc/default/volatiles 33 install -d ${D}/etc/default/volatiles
29 install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles 34 install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
35
36 install -d ${D}${systemd_unitdir}/system
37 install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
38 sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
30} 39}
31 40
32pkg_postinst_${PN} () { 41pkg_postinst_${PN} () {
diff --git a/meta/recipes-extended/sysstat/sysstat/sysstat.service b/meta/recipes-extended/sysstat/sysstat/sysstat.service
new file mode 100644
index 0000000000..aff07109f5
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat/sysstat.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=Resets System Activity Logs
3
4[Service]
5Type=oneshot
6RemainAfterExit=yes
7User=root
8ExecStart=@LIBDIR@/sa/sa1 --boot
9
10[Install]
11WantedBy=multi-user.target
12