From: Chen Qi Date: Wed, 16 Mar 2016 01:54:26 +0000 (+0800) Subject: sysstat: add configuration file in tmpfiles.d X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ce6522ada7dffeae0c5a7ee1f0df527c21816ca;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git sysstat: add configuration file in tmpfiles.d 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 --- diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc index c3532919352..c74788a8579 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} () {