Commit graph

2 commits

Author SHA1 Message Date
mglae
cd1ecef50d systemd/busybox: allow configuration of persistent logs and journal via settings addon 2021-08-07 23:03:09 +02:00
Matthias Reichl
d85c804c75 busybox: cleanup persistent log setup when debugging is enabled
The ancient approach of symlinking /var/log to /storage/log doesn't
play nice with systemd as it doesn't setup proper dependencies and
unmounting /storage during shutdown may fail because systemd doesn't
know that it's needed for /var/log.

Use a conditional bind mount instead so systemd can automatically
create proper dependencies and unmount filesystems in the correct order.

Also store the persistent logfiles on /storage in a .cache/log
directory instead of log to avoid confusing users - users can access
logfiles via /var/log.

Note: we can't use tmpfiles.d to create the .cache/log directory on
/storage because that would run after local-fs.target but we need
the .log directory before that so it has to be done via a one-shot
service.

Signed-off-by: Matthias Reichl <hias@horus.com>
2019-09-16 18:57:58 +02:00