aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-08-06 10:23:47 +0800
committerKhem Raj <raj.khem@gmail.com>2018-08-05 23:31:28 -0700
commit36ddb5233cdfe9306c4a18c9d5ad74cbc4ebf6f2 (patch)
treea9d734a598e053a39cddec7f12a94ace76867f0b
parent88c8866fbc5d809987b67eda290c545e4d46c660 (diff)
downloadmeta-openembedded-contrib-36ddb5233cdfe9306c4a18c9d5ad74cbc4ebf6f2.tar.gz
meta-openembedded-contrib-36ddb5233cdfe9306c4a18c9d5ad74cbc4ebf6f2.tar.bz2
meta-openembedded-contrib-36ddb5233cdfe9306c4a18c9d5ad74cbc4ebf6f2.zip
rsyslog: add PACKAGECONFIG for imjournal
Add PACKAGECONFIG for imjournal, and add corresponding configuration to /etc/rsyslog.d/imjournal.conf when it's enabled. Default to disable it. This patch also enables rsyslog.conf to include configuration files /etc/rsyslog.d/*.conf. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf5
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog_8.36.0.bb6
2 files changed, 11 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf
index 324ae6d82a..dbfefb7597 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf
@@ -84,3 +84,8 @@ $ActionQueueMaxDiskSpace 10m # 1gb space limit (use as much as possible)
# UDP Syslog Server:
#$ModLoad imudp.so # provides UDP syslog reception
#$UDPServerRun 514 # start a UDP syslog server at standard port 514
+
+#
+# Include all config files in /etc/rsyslog.d/
+#
+$IncludeConfig /etc/rsyslog.d/*.conf
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.36.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.36.0.bb
index d90695a608..13c1f56ee7 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog_8.36.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.36.0.bb
@@ -67,6 +67,7 @@ PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,,"
PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp,"
PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls,"
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd,"
+PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal,"
PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,"
PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql,"
PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi,"
@@ -126,6 +127,11 @@ do_install_append() {
install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog
sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog
+
+ if ${@bb.utils.contains('PACKAGECONFIG', 'imjournal', 'true', 'false', d)}; then
+ install -d 0755 ${D}${sysconfdir}/rsyslog.d
+ echo '$ModLoad imjournal' >> ${D}${sysconfdir}/rsyslog.d/imjournal.conf
+ fi
}
FILES_${PN} += "${bindir}"