diff options
author | Haiqing Bai <Haiqing.Bai@windriver.com> | 2019-07-12 13:49:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-15 09:29:59 +0100 |
commit | adb34c109832b2626af7fef4793c92abfc5b9dfe (patch) | |
tree | 9ae3b58ad2ddc69d72c527355aa3091b5c9730ba /meta/recipes-extended/sysstat | |
parent | f0c0e393fe02cc6ced7fd3d7ca9e02f13fbef01c (diff) | |
download | poky-adb34c109832b2626af7fef4793c92abfc5b9dfe.tar.gz |
sysstat: Use sysstat.service in source for cron with systemd
The sysstat.service script in source launchs sysstat-collect and sysstat-summary
services when cron is installed with systemd. At this time, the upstream
sysstat.service must be installed.
(From OE-Core rev: 06a596ff8100f4a6506ff8d7f9ec93dd6aac6cb2)
Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
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.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc index 4e29721666..592cbf4574 100644 --- a/meta/recipes-extended/sysstat/sysstat.inc +++ b/meta/recipes-extended/sysstat/sysstat.inc | |||
@@ -20,6 +20,7 @@ inherit autotools-brokensep gettext systemd upstream-version-is-even | |||
20 | PACKAGECONFIG ??= "" | 20 | PACKAGECONFIG ??= "" |
21 | PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors" | 21 | PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors" |
22 | PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only" | 22 | PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only" |
23 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}" | ||
23 | 24 | ||
24 | EXTRA_OECONF += "--disable-stripping" | 25 | EXTRA_OECONF += "--disable-stripping" |
25 | 26 | ||
@@ -44,11 +45,13 @@ do_install() { | |||
44 | install -d ${D}${sysconfdir}/tmpfiles.d | 45 | install -d ${D}${sysconfdir}/tmpfiles.d |
45 | echo "d ${localstatedir}/log/sa - - - -" \ | 46 | echo "d ${localstatedir}/log/sa - - - -" \ |
46 | > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf | 47 | > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf |
47 | fi | ||
48 | 48 | ||
49 | install -d ${D}${systemd_unitdir}/system | 49 | if ${@bb.utils.contains('PACKAGECONFIG', 'cron', 'false', 'true', d)}; then |
50 | install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system | 50 | install -d ${D}${systemd_unitdir}/system |
51 | sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service | 51 | install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system |
52 | sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service | ||
53 | fi | ||
54 | fi | ||
52 | } | 55 | } |
53 | 56 | ||
54 | pkg_postinst_${PN} () { | 57 | pkg_postinst_${PN} () { |