Bug 241766 - Logrotate ignores pre/postrotating scripts arguments
Logrotate ignores pre/postrotating scripts arguments
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: logrotate (Show other bugs)
4.5
All Linux
medium Severity medium
: rc
: ---
Assigned To: Tomas Smetana
: EasyFix, Regression
Depends On:
Blocks: 445554
  Show dependency treegraph
 
Reported: 2007-05-30 10:17 EDT by Tomas Smetana
Modified: 2010-10-22 11:22 EDT (History)
3 users (show)

See Also:
Fixed In Version: RHBA-2008-0703
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-24 15:52:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Tomas Smetana 2007-05-30 10:17:57 EDT
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 10:17:57 EDT
Created attachment 155685 [details]
Proposed patch
Comment 2 RHEL Product and Program Management 2007-05-30 10:25:48 EDT
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 07:16:16 EDT
Should I (or anyone) move this one to 4.7?
Comment 4 Tomas Smetana 2007-08-16 08:52:36 EDT
Moving to 4.7. This is not that serious.
Comment 5 RHEL Product and Program Management 2007-08-16 08:56:28 EDT
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 12:20:04 EDT
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 04:36:41 EDT
Any status on a fix for this bug?
Comment 10 Tomas Smetana 2008-03-13 04:44:00 EDT
(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 15:52:12 EDT
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.