mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-05 02:50:46 +00:00
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 <sledz@dresearch-fe.de> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
committed by
Martin Jansa
parent
f4ed56d0d4
commit
6de2fb38b0
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user