summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sysstat
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2019-11-13 06:14:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-14 13:21:00 +0000
commit5c9e840daee19bc3371829fa915f6ced200b8c5f (patch)
tree532ce305ce905418a99e9924927b08557774f5e3 /meta/recipes-extended/sysstat
parent045d0c282ff854e012a4add66f61d4eecf3ec2db (diff)
downloadpoky-5c9e840daee19bc3371829fa915f6ced200b8c5f.tar.gz
sysstat: Correct when to use the package provided systemd unit files
There have been a number of changes back and forth as to when and how to use the systemd unit files provided by the package. The correct condition is actually that both cron and systemd need to be enabled for them to be installed. (From OE-Core rev: d6c975160197f67937dfbe91b08100b0f597c589) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.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.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index 9394090136..62de36b44b 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -17,7 +17,7 @@ DEPENDS += "base-passwd"
17# autotools-brokensep as this package doesn't use automake 17# autotools-brokensep as this package doesn't use automake
18inherit autotools-brokensep gettext systemd upstream-version-is-even 18inherit autotools-brokensep gettext systemd upstream-version-is-even
19 19
20PACKAGECONFIG ??= "" 20PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
21PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors" 21PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
22PACKAGECONFIG[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"
23PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}" 23PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}"
@@ -46,7 +46,9 @@ do_install() {
46 echo "d ${localstatedir}/log/sa - - - -" \ 46 echo "d ${localstatedir}/log/sa - - - -" \
47 > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf 47 > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf
48 48
49 if ${@bb.utils.contains('PACKAGECONFIG', 'cron', 'false', 'true', d)}; then 49 # Unless both cron and systemd are enabled, install our own
50 # systemd unit file. Otherwise the package will install one.
51 if ${@bb.utils.contains('PACKAGECONFIG', 'cron systemd', 'false', 'true', d)}; then
50 install -d ${D}${systemd_unitdir}/system 52 install -d ${D}${systemd_unitdir}/system
51 install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system 53 install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
52 sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/sysstat.service 54 sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/sysstat.service