From 9862e00d29c29318c065385de0990e682820fabe Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Thu, 17 Mar 2022 10:25:00 +0000 Subject: rsyslog: fix default server config Directory /etc/rsyslog.d/ is expected to hold several *.conf files each serving an independent purpose, all processed in order for each syslog message. The deprecated action ~ means "discard action is carried out, the received message is immediately discarded. No further processing of it occurs". Thus the config files that happen to be alphabetically after server.conf are not going to ever see any messages, and that is unexpected and confusing. Fix by shipping a config which writes any message to /dev/null. This is needed to avoid error 2103 in default configuration where no other output actions are specified for rsyslog. Also enable processing of other *.conf file which might be shipped by other packages or added by an end user. This should also be accomplished by a similar change to phosphor-logging so that it wouldn't revert to wrong behaviour when sending to remote syslog is disabled. Signed-off-by: Paul Fertser Change-Id: I5da9a46df1b8cf1326bb1a7b93af18cfc568dee8 --- meta-phosphor/recipes-extended/rsyslog/rsyslog/rsyslog.conf | 2 +- meta-phosphor/recipes-extended/rsyslog/rsyslog/server.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'meta-phosphor/recipes-extended/rsyslog') diff --git a/meta-phosphor/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-phosphor/recipes-extended/rsyslog/rsyslog/rsyslog.conf index 40b3f294f2..ebdf14dfc3 100644 --- a/meta-phosphor/recipes-extended/rsyslog/rsyslog/rsyslog.conf +++ b/meta-phosphor/recipes-extended/rsyslog/rsyslog/rsyslog.conf @@ -1,3 +1,3 @@ $ModLoad imuxsock -$IncludeConfig /etc/rsyslog.d/server.conf +$IncludeConfig /etc/rsyslog.d/*.conf diff --git a/meta-phosphor/recipes-extended/rsyslog/rsyslog/server.conf b/meta-phosphor/recipes-extended/rsyslog/rsyslog/server.conf index cf47ba3060..d2a7c5ea3f 100644 --- a/meta-phosphor/recipes-extended/rsyslog/rsyslog/server.conf +++ b/meta-phosphor/recipes-extended/rsyslog/rsyslog/server.conf @@ -1 +1 @@ -*.* ~ +*.* /dev/null -- cgit v1.2.3