[oe-commits] [openembedded-core] 30/49: sysstat: fix creating configuration file for /var/log/sa
git at git.openembedded.org
git at git.openembedded.org
Mon Aug 14 13:21:18 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 2114c69bfa3a20c5f1cbc85b6c3cb39a23d8e2f0
Author: Chen Qi <Qi.Chen at windriver.com>
AuthorDate: Thu Aug 10 09:46:04 2017 +0800
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.
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-extended/sysstat/sysstat.inc | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index 18b0861..61da4cd 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -32,10 +32,16 @@ do_install() {
autotools_do_install
# don't install /var/log/sa when populating rootfs. Do it through volatile
-
rm -rf ${D}/var
- install -d ${D}/etc/default/volatiles
- install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
+ fi
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d ${localstatedir}/log/sa - - - -" \
+ > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf
+ fi
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list