syslog-ng: add UPDATE_ALTERNATIVE for syslog-service
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 syslog-ng: add UPDATE_ALTERNATIVE for syslog-service
Use ALTERNATIVE mechanism in OE to manage the syslog service to avoid conflicts with other syslog implementations like rsyslog or busybox.
Signed-off-by Steffen Sledz <[email protected]>
--- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +7 -1
@@ -96,12 +96,18 @@ SYSTEMD_SERVICE_${PN} = "${BPN}.service" # no syslog-init for systemd python () { - if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split(): + if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): 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)) + + if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): + pn = d.getVar('PN', True) + d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-service') + d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-service', '%s/systemd/system/syslog.service' % (d.getVar('sysconfdir', True))) + d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-service', '%s/system/${BPN}.service' % (d.getVar('systemd_unitdir', True))) } INITSCRIPT_NAME = "syslog"
Signature · 1 line
2.6.3
This fixes [YOCTO-8688].
Signature · 7 lines
DResearch Fahrzeugelektronik GmbH Otto-Schmirgal-Str. 3, 10319 Berlin, Germany Tel: +49 30 515932-237 mailto:[email protected] Fax: +49 30 515932-299 Geschäftsführer: Dr. Michael Weber, Werner Mögle; Amtsgericht Berlin Charlottenburg; HRB 130120 B; Ust.-IDNr. DE273952058