mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] logrotate: change from single config file to drop-in directory
@ 2019-09-05 10:37 Juergen Borleis
  2019-09-05 11:00 ` Alexander Dahl
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Borleis @ 2019-09-05 10:37 UTC (permalink / raw)
  To: ptxdist

Instead of using only one single config file, a drop-in directory is more
useful to support various users of 'logrotate'.

This change still expects the BSP to provide the '/etc/logrotate.d'
directory and the required config files in there.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 projectroot/etc/logrotate.conf | 14 +-------------
 rules/logrotate.in             |  7 ++++++-
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/projectroot/etc/logrotate.conf b/projectroot/etc/logrotate.conf
index d872dcc5d..e3d85c4ff 100644
--- a/projectroot/etc/logrotate.conf
+++ b/projectroot/etc/logrotate.conf
@@ -1,13 +1 @@
-/var/log/syslog {
-	missingok
-
-	# rotate after X bytes - ignore time
-	size 512k
-
-	# keep backlog of X
-	rotate 20
-
-	postrotate
-		systemctl restart rsyslog
-	endscript
-}
+include /etc/logrotate.d
diff --git a/rules/logrotate.in b/rules/logrotate.in
index 097804017..f3b465b87 100644
--- a/rules/logrotate.in
+++ b/rules/logrotate.in
@@ -15,8 +15,13 @@ menuconfig LOGROTATE
 	  log file gets to a certain size. Normally, logrotate runs as
 	  a daily cron job.
 
+	  In order to make 'logrotate' work at run-time, a directory
+	  '/etc/logrotate.d' is required which must contain your own 'logrotate'
+	  config files (refer the manpage). There are no defaults in this
+	  package.
+
 	  Note: on a read-only root filesystem this package still requires a
-	  writable '/var/lib' for its run-time information.
+	  writable '/var/lib' for its run-time state information.
 
 if LOGROTATE
 
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] logrotate: change from single config file to drop-in directory
  2019-09-05 10:37 [ptxdist] [PATCH] logrotate: change from single config file to drop-in directory Juergen Borleis
@ 2019-09-05 11:00 ` Alexander Dahl
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Dahl @ 2019-09-05 11:00 UTC (permalink / raw)
  To: ptxdist

Hello Jürgen,

Am Donnerstag, 5. September 2019, 12:37:50 CEST schrieb Juergen Borleis:
> Instead of using only one single config file, a drop-in directory is more
> useful to support various users of 'logrotate'.
> 
> This change still expects the BSP to provide the '/etc/logrotate.d'
> directory and the required config files in there.
> 
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
> ---
>  projectroot/etc/logrotate.conf | 14 +-------------
>  rules/logrotate.in             |  7 ++++++-
>  2 files changed, 7 insertions(+), 14 deletions(-)
> 
> diff --git a/projectroot/etc/logrotate.conf b/projectroot/etc/logrotate.conf
> index d872dcc5d..e3d85c4ff 100644
> --- a/projectroot/etc/logrotate.conf
> +++ b/projectroot/etc/logrotate.conf
> @@ -1,13 +1 @@
> -/var/log/syslog {
> -	missingok
> -
> -	# rotate after X bytes - ignore time
> -	size 512k
> -
> -	# keep backlog of X
> -	rotate 20
> -
> -	postrotate
> -		systemctl restart rsyslog
> -	endscript
> -}
> +include /etc/logrotate.d
> diff --git a/rules/logrotate.in b/rules/logrotate.in
> index 097804017..f3b465b87 100644
> --- a/rules/logrotate.in
> +++ b/rules/logrotate.in
> @@ -15,8 +15,13 @@ menuconfig LOGROTATE
>  	  log file gets to a certain size. Normally, logrotate runs as
>  	  a daily cron job.
> 
> +	  In order to make 'logrotate' work at run-time, a directory
> +	  '/etc/logrotate.d' is required which must contain your own 'logrotate'
> +	  config files (refer the manpage). There are no defaults in this
> +	  package.
> +
>  	  Note: on a read-only root filesystem this package still requires a
> -	  writable '/var/lib' for its run-time information.
> +	  writable '/var/lib' for its run-time state information.
> 
>  if LOGROTATE

Reviewed-by: Alexander Dahl <ada@thorsis.com>

Greets
Alex


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-05 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 10:37 [ptxdist] [PATCH] logrotate: change from single config file to drop-in directory Juergen Borleis
2019-09-05 11:00 ` Alexander Dahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox