Patchwork [meta-oe] rsyslog: use syslog as the script name of syslog-init

login
register
mail settings
Submitter jackie huang
Date Aug. 6, 2014, 3:18 a.m.
Message ID <1407295136-11730-1-git-send-email-jackie.huang@windriver.com>
Download mbox | patch
Permalink /patch/77345/
State Accepted, archived
Headers show

Comments

jackie huang - Aug. 6, 2014, 3:18 a.m.
From: Jackie Huang <jackie.huang@windriver.com>

Use syslog as the default symlink and INITSCRIPT_NAME
just as sysklogd and syslog-ng did.

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

Patch

diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
index 3bb92fa..6ee571e 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
@@ -64,14 +64,14 @@  PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,,"
 
 do_install_append() {
     install -d "${D}${sysconfdir}/init.d"
-    install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/rsyslogd
+    install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog.${BPN}
     install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
     install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.rsyslog
 }
 
 FILES_${PN} += "${bindir}"
 
-INITSCRIPT_NAME = "rsyslogd"
+INITSCRIPT_NAME = "syslog"
 INITSCRIPT_PARAMS = "defaults"
 
 # higher than sysklogd's 100
@@ -101,6 +101,5 @@  python () {
         pn = d.getVar('PN', True)
         sysconfdir = d.getVar('sysconfdir', True)
         d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init')
-        d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslogd' % (sysconfdir))
-        d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/rsyslogd' % (sysconfdir))
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir))
 }