mirror of
https://github.com/systemd/systemd
synced 2024-09-06 00:41:36 +00:00
![Krayushkin Konstantin](/assets/img/avatar_default.png)
If the machine was suddenly shutted down (hard reboot for example) while processing core dump, temp files created manually (not with a O_TEMPFILE flag) stay in the system. After reboot systemd-coredump treat them as usual files, so they wouldn't be rotated and shall pollute the filesystem. Solution is to simply add those temp files to systemd-tmpfiles configs.
24 lines
823 B
Plaintext
24 lines
823 B
Plaintext
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# See tmpfiles.d(5) for details
|
|
|
|
# Exclude namespace mountpoints created with PrivateTmp=yes
|
|
x /tmp/systemd-private-%b-*
|
|
X /tmp/systemd-private-%b-*/tmp
|
|
x /var/tmp/systemd-private-%b-*
|
|
X /var/tmp/systemd-private-%b-*/tmp
|
|
|
|
# Remove top-level private temporary directories on each boot
|
|
R! /tmp/systemd-private-*
|
|
R! /var/tmp/systemd-private-*
|
|
|
|
# Handle lost systemd-coredump temp files. They could be lost on old filesystems,
|
|
# for example, after hard reboot.
|
|
x /var/lib/systemd/coredump/.#core*.%b*
|
|
r! /var/lib/systemd/coredump/.#*
|