Bug 194864

Summary: newsyslog(8) does not delete old files after config change
Product: Base System Reporter: Robert Schulze <rs>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: 10.0-STABLE   
Hardware: amd64   
OS: Any   

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.