Bug 241766 - Logrotate ignores pre/postrotating scripts arguments
Summary: Logrotate ignores pre/postrotating scripts arguments
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: logrotate
Version: 4.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tomas Smetana
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 445554
TreeView+ depends on / blocked
 
Reported: 2007-05-30 14:17 UTC by Tomas Smetana
Modified: 2018-10-19 19:59 UTC (History)
3 users (show)

Fixed In Version: RHBA-2008-0703
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-24 19:52:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch (316 bytes, patch)
2007-05-30 14:17 UTC, Tomas Smetana
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0703 0 normal SHIPPED_LIVE logrotate bug fix and enhancement update 2008-07-23 16:31:04 UTC

Description Tomas Smetana 2007-05-30 14:17:57 UTC
Description of problem:
Pre/postrotate script argument is ignored.

Version-Release number of selected component (if applicable):
3.7.1-6

How reproducible:
Always.

Steps to Reproduce:

1. Create a test log:
   mkdir /tmp/test_log; echo "hi there" > /tmp/test_log/the_log

2. Create a test config file /tmp/test_log/config with the following content:
   /tmp/test_log/the_log {
        rotate 6
        compress
        missingok
        create
        postrotate
                echo $1
        endscript
   }

3. Run logrotate -f /tmp/test_log/config
  
Actual results:
An empty line is echoed.

Expected results:
"/tmp/test_log/the_log" is echoed.

Additional info:

Comment 1 Tomas Smetana 2007-05-30 14:17:57 UTC
Created attachment 155685 [details]
Proposed patch

Comment 2 RHEL Program Management 2007-05-30 14:25:48 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 3 Tomas Smetana 2007-08-03 11:16:16 UTC
Should I (or anyone) move this one to 4.7?

Comment 4 Tomas Smetana 2007-08-16 12:52:36 UTC
Moving to 4.7. This is not that serious.

Comment 5 RHEL Program Management 2007-08-16 12:56:28 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 6 Eric Janz 2007-08-16 16:20:04 UTC
We would greatly appreciate if this bug gets solved in 4.5 ASAP because our
postrotate scripts do a couple of things with each log beeing rotated (
compress, move to another location, etc... )

By now, we rolled back the logrotate binary to version 3.7.1-5 and added
logrotate to the skip list in up2date, but this is a little bit painful ...

Thanks in advance.

Comment 9 Enzo 2008-03-13 08:36:41 UTC
Any status on a fix for this bug?


Comment 10 Tomas Smetana 2008-03-13 08:44:00 UTC
(In reply to comment #9)
> Any status on a fix for this bug?

Patch is ready, will be present in 4.7.

Comment 14 errata-xmlrpc 2008-07-24 19:52:12 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0703.html


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