]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
sysstat: add configuration file in tmpfiles.d ChenQi/sysstat-tmpfiles
authorChen Qi <Qi.Chen@windriver.com>
Wed, 16 Mar 2016 01:54:26 +0000 (09:54 +0800)
committerChen Qi <Qi.Chen@windriver.com>
Wed, 16 Mar 2016 02:32:33 +0000 (10:32 +0800)
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>
meta/recipes-extended/sysstat/sysstat.inc

index c353291935269b99887c3c925f9516875d18ba5d..c74788a8579ac669ab89fcb44bb73acb22ef1bed 100644 (file)
@@ -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} () {