On Jun 20, 2012 6:05 PM, "Lukáš Jirkovský" <l.jirkov...@gmail.com> wrote:
>
> Hello,
> before submitting bug report I want to make sure this isn't feature.
> My problem is that my /tmp folder is no longer cleaned up during boot.
> Now I have to do that manually which is really annoying.
>
> I dug through the git of initscripts and it seems to be caused by the
> replacement of the original code by the systemd-tmpfiles tool. I've
> just tried to run systemd-tmpfiles manually and it seems that it is
> not able to do even a simple task such as rm -rf /tmp/*.

There was a slight change in behavior. Earlier we would delete all files at
boot, now we (or rather systemd-tmpfiles on our behalf) delete all 'old
files'. That is, all files that have not been accessed within the last then
days.

This behavior is configured in /usr/lib/tmpfiles.d/tmp.conf. To change the
behavior, copy the file to /etc/tmpfiles.d/ and edit it there. You can
easily configure it to get the old behavior back.

Alternatively, you could put /tmp on a tmpfs, to throw away all contents on
reboot; or create a cron job that calls systemd-tmpfiles regularly (say
once a day) to also delete old files at runtime, rather than only at boot.

Check 'man tmpfiles.d' for more details.

Cheers,

Tom

Reply via email to