aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2016-03-16 09:54:26 +0800
committerChen Qi <Qi.Chen@windriver.com>2016-03-16 10:32:33 +0800
commit3ce6522ada7dffeae0c5a7ee1f0df527c21816ca (patch)
tree9f7b8b6eec7011b630fab4f0fc23cb8265be87db
parent300f858ba07c938427ccd05a3d7220027a03d461 (diff)
downloadopenembedded-core-contrib-ChenQi/sysstat-tmpfiles.tar.gz
sysstat: add configuration file in tmpfiles.dChenQi/sysstat-tmpfiles
In sysvinit, we create /var/log/sa via populate-volatiles.sh script and /etc/default/volatile/99_sysstat configuration file. In systemd, we need to create a corresponding configuration file under /etc/tmpfiles.d in order to create /var/log/sa. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index c353291935..c74788a857 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -39,6 +39,12 @@ do_install() {
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
+
+ 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
}
pkg_postinst_${PN} () {