summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sysstat
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-07-12 13:49:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-15 09:29:59 +0100
commitf0c0e393fe02cc6ced7fd3d7ca9e02f13fbef01c (patch)
treec62c31791c7e078b58ebbac1b534361075b1033c /meta/recipes-extended/sysstat
parentd04132897c2cf67dff9948ee9c2c42cbae15387a (diff)
downloadpoky-f0c0e393fe02cc6ced7fd3d7ca9e02f13fbef01c.tar.gz
Revert "sysstat: use service file from source codes"
This doesn't actually work as the unit file is only installed if cron support is enabled. This reverts commit 721f09d4897425c7131470bd756eee1b90937feb. (From OE-Core rev: 559465348de5210c7d29361f79666b62bd6660aa) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/sysstat')
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc8
-rw-r--r--meta/recipes-extended/sysstat/sysstat/sysstat.service12
2 files changed, 18 insertions, 2 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index 9085fcfe74..4e29721666 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -6,6 +6,7 @@ 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
11UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html" 12UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html"
@@ -16,10 +17,9 @@ DEPENDS += "base-passwd"
16# autotools-brokensep as this package doesn't use automake 17# autotools-brokensep as this package doesn't use automake
17inherit autotools-brokensep gettext systemd upstream-version-is-even 18inherit autotools-brokensep gettext systemd upstream-version-is-even
18 19
19PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" 20PACKAGECONFIG ??= ""
20PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors" 21PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
21PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only" 22PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only"
22PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}"
23 23
24EXTRA_OECONF += "--disable-stripping" 24EXTRA_OECONF += "--disable-stripping"
25 25
@@ -45,6 +45,10 @@ do_install() {
45 echo "d ${localstatedir}/log/sa - - - -" \ 45 echo "d ${localstatedir}/log/sa - - - -" \
46 > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf 46 > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf
47 fi 47 fi
48
49 install -d ${D}${systemd_unitdir}/system
50 install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
51 sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
48} 52}
49 53
50pkg_postinst_${PN} () { 54pkg_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