logrotate/logrotate-3.7.8-scripts-args.patch
2010-06-22 08:46:22 +00:00

23 lines
932 B
Diff

Index: logrotate.c
===================================================================
--- logrotate.c (revision 277)
+++ logrotate.c (working copy)
@@ -1293,7 +1293,7 @@
"since no logs will be rotated\n");
} else {
message(MESS_DEBUG, "running prerotate script\n");
- if (runScript(log->pattern, log->pre)) {
+ if (runScript(log->flags & LOG_FLAG_SHAREDSCRIPTS ? log->pattern : log->files[j], log->pre)) {
if (log->flags & LOG_FLAG_SHAREDSCRIPTS)
message(MESS_ERROR,
"error running shared prerotate script "
@@ -1328,7 +1328,7 @@
"since no logs were rotated\n");
} else {
message(MESS_DEBUG, "running postrotate script\n");
- if (runScript(log->pattern, log->post)) {
+ if (runScript(log->flags & LOG_FLAG_SHAREDSCRIPTS ? log->pattern : log->files[j], log->post)) {
if (log->flags & LOG_FLAG_SHAREDSCRIPTS)
message(MESS_ERROR,
"error running shared postrotate script "