[oe] [meta-oe][PATCH] rsyslog: don't call init script in logrotate conf file
Jack Mitchell
ml at communistcode.co.uk
Thu Jan 29 10:12:29 UTC 2015
On 29/01/15 07:46, jackie.huang at windriver.com wrote:
> From: Jackie Huang <jackie.huang at 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 at 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 at embed.me.uk)
Embedded Systems Engineer
Cambridgeshire, UK
http://www.embed.me.uk
--
More information about the Openembedded-devel
mailing list