config: Disable rsyslog and syslog forwarding
This change is designated for bullseye-next. CC @qa-nick-guest. This should help with reducing disk I/O no matter the filesystem.
Helps: #664 (closed).
Currently, logs are written to disk twice, once by journald and once by rsyslog. rsyslog may log to multiple locations depending on the type of the log. To reduce disk I/O, disable rsyslog and rely solely on systemd journal.
Place the code in config module as there is no better place for it currently without creating a new module. Can be sorted later.
The following files under /var/log/ are no longer populated on FreedomBox. They will be rotated away over a few days. Use journalctl instead to view the messages:
- syslog
- messages*
- auth.log*
- debug*
- daemon.log
- kern.log
- lpr.log
- mail.log
- mail.info
- mail.warn
- mail.err
- user.log
Tests performed:
-
On a machine with rsyslog running, run ./setup.py install and start FreedomBox service. This triggers the config app's setup. rsyslog is disabled and masked. systemd-journald is restarted.
-
Even when rsyslog is unmaked and enabled manually, systemd journald does not forward message to syslog anymore.