[OE-core] [PATCH] busybox: add UPDATE_ALTERNATIVE for syslog-service
Steffen Sledz
sledz at dresearch-fe.de
Wed Nov 11 14:37:57 UTC 2015
Use ALTERNATIVE mechanism in OE to manage the syslog service to
avoid conflicts with other syslog implementations like rsyslog
or syslog-ng.
Signed-off-by: Steffen Sledz <sledz at dresearch-fe.de>
---
meta/recipes-core/busybox/busybox.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 4d4709a..4531dd1 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -316,6 +316,12 @@ python () {
d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-startup-conf')
d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-startup-conf', '%s/syslog-startup.conf' % (d.getVar('sysconfdir', True)))
d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-startup-conf', '%s/syslog-startup.conf.%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/busybox-syslog.service' % (d.getVar('systemd_unitdir', True)))
}
python do_package_prepend () {
--
2.6.3
More information about the Openembedded-core
mailing list