Bug 1932 - logrotate behaviour inconsistent
Summary: logrotate behaviour inconsistent
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: logrotate
Version: 5.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Erik Troan
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-04-01 18:16 UTC by tim.wall
Modified: 2008-05-01 15:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-06-16 20:48:39 UTC

Attachments (Terms of Use)

Description tim.wall 1999-04-01 18:16:24 UTC
rotate 2 -> logs are mailed and disappear after being
rotated twice.  pre/postrotate scripts are executed.
rotate 1 -> logs are mailed and disappear after being
rotated once. pre/postrotate scripts are executed.
rotate 0 -> logs are removed. pre/postrotate scripts are

Logically, rotate 0 would mail logs and leave no rotated
log.  Instead, rotate 0 simply removes the log, and ignores
the pre/postrotate scripts.

The man page says "if count is 0, old versions are removed
rather then [sic] rotated."  By vague inference, you *might*
be able to figure out that if the log isn't rotated, the
pre/postrotate scripts won't run, but what is more likely is
that you set count to zero and scratch your head wondering
why your logs are never mailed and your process never gets
the HUP signal sent in the postrotate script.

Comment 1 Preston Brown 1999-04-01 18:46:59 UTC
Erik, do we want to change this, or leave as is?

Comment 2 redhat-bug-fixer 1999-04-10 02:49:59 UTC
FYI, the bug (RFE) I filed for being able to send mail of the
first item instead of the last one (which now includes URLs for
patches) is bug #2103.

Comment 3 Erik Troan 1999-06-16 20:48:59 UTC
A new logrotate tarball is at

Note You need to log in before you can comment on or make changes to this bug.