All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] rsyslog: don't call init script in logrotate conf file
@ 2015-01-29  7:46 jackie.huang
  2015-01-29 10:12 ` Jack Mitchell
  0 siblings, 1 reply; 2+ messages in thread
From: jackie.huang @ 2015-01-29  7:46 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

Send HUP signal instead of calling the reload command
of init script in logrotate configure file, so that it
also works when the init system is systemd.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
index ba1120a..94ec517 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
@@ -9,7 +9,7 @@
         delaycompress
         compress
         postrotate
-		/etc/init.d/rsyslog reload 2> /dev/null || true
+		/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
         endscript
 }
 
@@ -34,6 +34,6 @@
         delaycompress
         sharedscripts
         postrotate
-		/etc/init.d/rsyslog reload 2> /dev/null || true
+		/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
         endscript
 }
-- 
1.9.1



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

* Re: [meta-oe][PATCH] rsyslog: don't call init script in logrotate conf file
  2015-01-29  7:46 [meta-oe][PATCH] rsyslog: don't call init script in logrotate conf file jackie.huang
@ 2015-01-29 10:12 ` Jack Mitchell
  0 siblings, 0 replies; 2+ messages in thread
From: Jack Mitchell @ 2015-01-29 10:12 UTC (permalink / raw)
  To: openembedded-devel

On 29/01/15 07:46, jackie.huang@windriver.com wrote:
> From: Jackie Huang <jackie.huang@windriver.com>
> 
> Send HUP signal instead of calling the reload command
> of init script in logrotate configure file, so that it
> also works when the init system is systemd.
> 
> Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> ---
>  meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
> index ba1120a..94ec517 100644
> --- a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
> +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
> @@ -9,7 +9,7 @@
>          delaycompress
>          compress
>          postrotate
> -		/etc/init.d/rsyslog reload 2> /dev/null || true
> +		/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
>          endscript
>  }
>  
> @@ -34,6 +34,6 @@
>          delaycompress
>          sharedscripts
>          postrotate
> -		/etc/init.d/rsyslog reload 2> /dev/null || true
> +		/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
>          endscript
>  }
> 

This is better than my approach to fixing this as it works with systemd
also. I would take this patch in favour of my

[PATCH] rsyslog: init file has been renamed, reflect in logrotate conf file

Ack from me.

-- 
  Jack Mitchell (jack@embed.me.uk)
  Embedded Systems Engineer
  Cambridgeshire, UK
  http://www.embed.me.uk
-- 


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

end of thread, other threads:[~2015-01-29 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29  7:46 [meta-oe][PATCH] rsyslog: don't call init script in logrotate conf file jackie.huang
2015-01-29 10:12 ` Jack Mitchell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.