Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 604981

Summary: logrotate documentation does not discuss script arguments
Product: Red Hat Enterprise Linux 6 Reporter: Jan Kaluža <jkaluza>
Component: logrotateAssignee: Jan Kaluža <jkaluza>
Status: CLOSED CURRENTRELEASE QA Contact: Alex Sersen <asersen>
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: asersen, azelinka, bughunt, michael.mceniry, ohudlick, ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: logrotate-3.7.8-11.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 474013 Environment:
Last Closed: 2010-11-10 21:06:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 474013    
Bug Blocks: 602643    
Attachments:
Description Flags
proposed patch none

Description Jan Kaluža 2010-06-17 07:58:22 UTC
+++ This bug was initially created as a clone of Bug #474013 +++

Description of problem:
The documentation for logrotate does not discuss how it provides arguments to prerotate/postrotate scripts.

Version-Release number of selected component (if applicable):
3.7.4-9


The man page for logrotate does not mention arguments passed to the prerotate and postrotate scripts. However, bugs 241766 and 445554 indicate that logrotate passes as arguments to the script the matching log files that (are about to be / have just been) rotated.

What is the official behavior? If multiple log files are matched in a block, then how does logrotate pass those as arguments? Is the behavior altered by wildcards versus explicit names? Is the behavior altered by sharedscripts versus nosharedscripts?

--- Additional comment from d.tonhofer on 2010-04-24 12:00:22 EDT ---

Seconding this bug. The man page should actually *also* say that a bash script is actually accepted between the "prerotate/postrotate" and "endscript" tags (Or is it a sh script? how about on a Debian system? Can another shell be chosen?) It is all very experimentalist.

Still open for logrotate-3.7.4-9

Comment 2 Jan Kaluža 2010-06-17 08:05:30 UTC
Created attachment 424711 [details]
proposed patch

This patch adds description of actual logrotate scripts behaviour.

Comment 3 RHEL Program Management 2010-06-17 08:13:19 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Jan Kaluža 2010-06-17 10:21:31 UTC
Committes in CVS, fixed in logrotate-3.7.8-11.el6.

http://post-office.corp.redhat.com/archives/cvs-commits-list/2010-June/msg02208.html

Comment 7 releng-rhel@redhat.com 2010-11-10 21:06:27 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.