[OE-core] [PATCH 1/1] sysstat: add configuration file in tmpfiles.d
Chen Qi
Qi.Chen at windriver.com
Thu Oct 30 10:18:23 UTC 2014
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 at windriver.com>
---
meta/recipes-extended/sysstat/sysstat.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index 09a5d28..5e80d07 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -25,6 +25,12 @@ do_install() {
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', '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} () {
--
1.9.1
More information about the Openembedded-core
mailing list