rsyslog.conf: Set WorkDirectory to /var/lib/rsyslog

Without this set rsyslogd will try to use / for things like
/imjournal.state.tmp, which will fail due to SELinux.

This also replaces the deprecated '~' discard action with 'stop'.

Resolves: rhbz#2160070
This commit is contained in:
Brian C. Lane 2023-01-11 09:59:45 -08:00
parent b1efe2d576
commit 7c7a07ce37

View File

@ -39,7 +39,7 @@ $InputRunFileMonitor
#### GLOBAL DIRECTIVES #### #### GLOBAL DIRECTIVES ####
# Where to place auxiliary files # Where to place auxiliary files
#$WorkDirectory /var/lib/rsyslog $WorkDirectory /var/lib/rsyslog
# Use default timestamp format # Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
@ -70,7 +70,7 @@ $template virtio_ForwardFormat, "<%PRI%>%TIMESTAMP:::date-rfc3339% localhost %sy
# directly into files via python logging) # directly into files via python logging)
# discard messages from dracut regenerating initrd # discard messages from dracut regenerating initrd
:programname,isequal,"dracut" ~ :programname,isequal,"dracut" stop
*.*;\ *.*;\
authpriv.none;\ authpriv.none;\