On Fri 13 Mar 2009, Paul Slootman wrote: > On Thu 12 Mar 2009, Paul Martin wrote: > > > > The name of the file rotated is passed as an argument to the script. > > Hmm, I thought the unexpanded string was passed, e.g. > "/var/log/apache2/*.log", not the individual filenames. > I'll test this tonight.
I've confirmed that my suspicions were correct; again I find that running the postrotate script 10 times for 10 different logfiles, each time with the argument exactly: "/var/log/apache2/*.log" is not useful at all... I've also discovered that the postrotate script is run for each expansion of the pattern given, even if the logfile was not rotated (e.g. due to "notifempty"). This is contrary to the manpage, which states: nosharedscripts Run prerotate and postrotate scripts for every log file which is rotated ... ... postrotate/endscript The lines between postrotate and endscript (both of which must appear on lines by themselves) are executed after the log file is rotated. ... I suggest the following changes to the text: "every log file which is rotated" should be "every log file which is handled, including empty ones with the 'notifempty' directive active" "after the log file is rotated" should be "after the log file is processed, even it is not rotated due to being empty which the 'notifempty' directive is active". Similar changes may be necessary to the other script segments. Paul -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org