[oe] [meta-oe][PATCH] rsyslog: don't call init script in logrotate conf file

jackie.huang at windriver.com jackie.huang at windriver.com
Thu Jan 29 07:46:14 UTC 2015


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
 }
-- 
1.9.1




More information about the Openembedded-devel mailing list