summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2017-08-10 09:46:04 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-16 00:03:14 +0100
commite31ba8f1228d30d41a6b83aa3cc07051e9ff3872 (patch)
tree9e18d4dc3a772660d553a6d61930a845e83d33c8 /meta/recipes-extended
parent3ca6085729d9a1025156c7a47f433981c2076995 (diff)
downloadpoky-e31ba8f1228d30d41a6b83aa3cc07051e9ff3872.tar.gz
sysstat: fix creating configuration file for /var/log/sa
Fix to create configuration file related to /var/log/sa for sysvinit and systemd systems respectively. (From OE-Core rev: 652e515cbdf0f6314b63ec52b9fcac42299c3d60) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index 18b0861bf9..61da4cde0f 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -32,10 +32,16 @@ do_install() {
32 autotools_do_install 32 autotools_do_install
33 33
34 # don't install /var/log/sa when populating rootfs. Do it through volatile 34 # don't install /var/log/sa when populating rootfs. Do it through volatile
35
36 rm -rf ${D}/var 35 rm -rf ${D}/var
37 install -d ${D}/etc/default/volatiles 36 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
38 install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles 37 install -d ${D}/etc/default/volatiles
38 install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
39 fi
40 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
41 install -d ${D}${sysconfdir}/tmpfiles.d
42 echo "d ${localstatedir}/log/sa - - - -" \
43 > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf
44 fi
39 45
40 install -d ${D}${systemd_unitdir}/system 46 install -d ${D}${systemd_unitdir}/system
41 install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system 47 install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system