From: Giacomo Sanchietti Date: Thu, 9 Jun 2022 10:47:28 +0000 (+0200) Subject: rsyslog: include original config file X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d7084eae60fa40faa3bfa336cc7270cec9f219e3;p=feed%2Fpackages.git rsyslog: include original config file Allow advanced configurations from /etc/rsyslog.conf file Signed-off-by: Giacomo Sanchietti --- diff --git a/admin/rsyslog/files/rsyslog.init b/admin/rsyslog/files/rsyslog.init index 6d6d31caf2..a4e31b1fd6 100644 --- a/admin/rsyslog/files/rsyslog.init +++ b/admin/rsyslog/files/rsyslog.init @@ -7,6 +7,7 @@ USE_PROCD=1 UCI_CONF="rsyslog" CONFIG_FILE="/var/etc/rsyslog.conf" +BASE_CONFIG_FILE="/etc/rsyslog.conf" modules="" selectors="" @@ -74,7 +75,9 @@ expand_config() { config_foreach handle_selector selector config_foreach handle_forwarder forwarder + mkdir -p $(dirname ${CONFIG_FILE}) > ${CONFIG_FILE} + echo "include(file=\"${BASE_CONFIG_FILE}\" mode=\"optional\")" >> ${CONFIG_FILE} for m in ${modules}; do echo "module(load=\"${m}\")" >> ${CONFIG_FILE} done