aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/syslog-ng/syslog-ng.inc16
1 files changed, 11 insertions, 5 deletions
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
index 3cedba65b20..57976b3a2af 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
@@ -84,11 +84,17 @@ RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "",
RPROVIDES_${PN} += "${PN}-systemd"
RREPLACES_${PN} += "${PN}-systemd"
RCONFLICTS_${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE_${PN} = "${PN}.service"
-
-ALTERNATIVE_${PN} = "syslog-init"
-ALTERNATIVE_PRIORITY[syslog-init] = "200"
-ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
+SYSTEMD_SERVICE_${PN} = "${BPN}.service"
+
+# no syslog-init for systemd
+python () {
+ if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split():
+ pn = d.getVar('PN', True)
+ sysconfdir = d.getVar('sysconfdir', True)
+ d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init')
+ d.setVarFlag('ALTERNATIVE_PRIORITY', 'syslog-init', '200')
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir))
+}
INITSCRIPT_NAME = "syslog"
INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."