Red Hat Bugzilla – Bug 604981
logrotate documentation does not discuss script arguments
Last modified: 2013-10-31 21:33:42 EDT
+++ 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):
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 firstname.lastname@example.org 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
Created attachment 424711 [details]
This patch adds description of actual logrotate scripts behaviour.
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
Committes in CVS, fixed in logrotate-3.7.8-11.el6.
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.