b0ff9c33c7
... used by logrotate cron job
58 lines
1.8 KiB
Diff
58 lines
1.8 KiB
Diff
From 70a8b71fd9d4951e69d1c4116dc28d2e1873d0eb Mon Sep 17 00:00:00 2001
|
|
From: rpm-build <rpm-build>
|
|
Date: Wed, 3 Aug 2016 14:30:19 +0200
|
|
Subject: [PATCH] logrotate.cron: use /var/lib/logrotate/logrotate.status as
|
|
state file
|
|
|
|
Signed-off-by: rpm-build <rpm-build>
|
|
---
|
|
examples/logrotate.cron | 2 +-
|
|
logrotate.8 | 10 ++++++++--
|
|
2 files changed, 9 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/examples/logrotate.cron b/examples/logrotate.cron
|
|
index c6d50d4..967932e 100644
|
|
--- a/examples/logrotate.cron
|
|
+++ b/examples/logrotate.cron
|
|
@@ -1,6 +1,6 @@
|
|
#!/bin/sh
|
|
|
|
-/usr/sbin/logrotate /etc/logrotate.conf
|
|
+/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf
|
|
EXITVALUE=$?
|
|
if [ $EXITVALUE != 0 ]; then
|
|
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
|
|
diff --git a/logrotate.8 b/logrotate.8
|
|
index 3f30472..9c62dc8 100644
|
|
--- a/logrotate.8
|
|
+++ b/logrotate.8
|
|
@@ -66,6 +66,9 @@ and mail it to the recipient. The default mail command is \fB/bin/mail
|
|
Tells \fBlogrotate\fR to use an alternate state file. This is useful
|
|
if logrotate is being run as a different user for various sets of
|
|
log files. The default state file is \fI/var/lib/logrotate.status\fR.
|
|
+Note that logrotate cron job on Fedora overrides the default with
|
|
+\fI/var/lib/logrotate/logrotate.status\fR in order to support read-only
|
|
+mounted root file systems.
|
|
|
|
.TP
|
|
\fB\-\-usage\fR
|
|
@@ -557,10 +560,13 @@ Log files are rotated if the current year is not the same as the last rotation.
|
|
|
|
.SH FILES
|
|
.PD 0
|
|
-.TP 27
|
|
+.TP 42
|
|
\fI/var/lib/logrotate.status\fR
|
|
Default state file.
|
|
-.TP 27
|
|
+.TP 42
|
|
+\fI/var/lib/logrotate/logrotate.status\fR
|
|
+Default state file used by logrotate cron job on Fedora.
|
|
+.TP 42
|
|
\fI/etc/logrotate.conf\fR
|
|
Configuration options.
|
|
|
|
--
|
|
2.5.5
|
|
|