Bug 194864 - newsyslog(8) does not delete old files after config change
Summary: newsyslog(8) does not delete old files after config change
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-06 12:33 UTC by Robert Schulze
Modified: 2014-11-06 12:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Schulze 2014-11-06 12:33:00 UTC
Lets assume the following entry in /etc/newsyslog.conf:

/var/log/httpd-suexec.log               640  14    *    @T00  JC 

After 14 days, there are 14 compressed files httpd-suexec.N.log.bz2 in /var/log.
Now lower the count from 14 to 7:

/var/log/httpd-suexec.log               640  7    *    @T00  JC 

One may assume, that newsyslog will delete 7 files in the next run, since there should only be kept 7 old logfiles. 

But it doesn't, it just deletes the 8th old logfile (httpd-suexec.log.7.bz2) and keeps httpd-suexec.log.{8,9,10,11,12,13}.bz2.