Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Steffen Sledz <sledz@dresearch-fe.de>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] busybox: add UPDATE_ALTERNATIVE for syslog-service
Date: Wed, 11 Nov 2015 15:37:57 +0100	[thread overview]
Message-ID: <564352C5.9060208@dresearch-fe.de> (raw)
In-Reply-To: <1447161703-4174-2-git-send-email-sledz@dresearch-fe.de>

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@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





       reply	other threads:[~2015-11-11 14:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1447161703-4174-2-git-send-email-sledz@dresearch-fe.de>
2015-11-11 14:37 ` Steffen Sledz [this message]
2015-11-12 14:03   ` [PATCH] busybox: add UPDATE_ALTERNATIVE for syslog-service Steffen Sledz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=564352C5.9060208@dresearch-fe.de \
    --to=sledz@dresearch-fe.de \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox