The following patch fixes some inconveniences I came around. First thing is to have a diffent setting of the amount of a time an empty directory is deleted after. This is in the current version a little bit annoying because if there are subdirectories in /tmp all the files in it are deleted by the script, which changes the modification time of this directory and thus the directory will be deleted only after another period according to $daily_clean_tmps_days. Second thing deals with the ssh-agent sockets created by sshd in /tmp. If you do not shutdown the ssh-connection properly (which can be caused when using ssh over a dial-in connection) these sockets fill-up /tmp because sockets are never deleted from /tmp. The attached fix is in action here on all my servers for a reasonable amount of time (at least two months on -current and -stable) so I'm pretty confident that it won't cause problems.
> >Number: 30938 > >Category: conf > >Synopsis: Improving behavior of /etc/periodic/daily/110.clean-tmps Hi, While I appreciate the problems here (I have exactly the same problems here), I'm not sure if these solutions are the best that could be come up with. In the first case (where directories aren't being deleted at the right time), maybe a better solution is to delete all empty directories. In the second case (ssh leaving stuff around), I think the bug in ssh should really be fixed. Failing this, maybe the best solution is to include special files in the list of deletion candidates. -- Brian <brian@freebsd-services.com> <brian@Awfulhak.org> http://www.freebsd-services.com/ <brian@[uk.]FreeBSD.org> Don't _EVER_ lose your sense of humour ! <brian@[uk.]OpenBSD.org>
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>