mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
rsyslog: add UPDATE_ALTERNATIVE for syslog-service
Use ALTERNATIVE mechanism in OE to manage the syslog service to avoid conflicts with other syslog implementations like sysklogd or busybox. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
parent
e335110e1e
commit
2b32463cfc
|
|
@ -97,9 +97,16 @@ RDEPENDS_${PN} += "logrotate"
|
|||
|
||||
# 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_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir))
|
||||
d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True)))
|
||||
|
||||
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/rsyslog.service' % (d.getVar('systemd_unitdir', True)))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user