All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] syslog-ng: add UPDATE_ALTERNATIVE for syslog-service
       [not found] <1447161133-3700-2-git-send-email-sledz@dresearch-fe.de>
@ 2015-11-11 14:34 ` Steffen Sledz
  2015-11-12 14:02   ` Steffen Sledz
  0 siblings, 1 reply; 2+ messages in thread
From: Steffen Sledz @ 2015-11-11 14:34 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

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>
---
 meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
index a990bf8..54f6920 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
@@ -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"
-- 
2.6.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-oe][PATCH] syslog-ng: add UPDATE_ALTERNATIVE for syslog-service
  2015-11-11 14:34 ` [meta-oe][PATCH] syslog-ng: add UPDATE_ALTERNATIVE for syslog-service Steffen Sledz
@ 2015-11-12 14:02   ` Steffen Sledz
  0 siblings, 0 replies; 2+ messages in thread
From: Steffen Sledz @ 2015-11-12 14:02 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

This fixes [YOCTO-8688].

-- 
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:sledz@dresearch-fe.de
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-12 14:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1447161133-3700-2-git-send-email-sledz@dresearch-fe.de>
2015-11-11 14:34 ` [meta-oe][PATCH] syslog-ng: add UPDATE_ALTERNATIVE for syslog-service Steffen Sledz
2015-11-12 14:02   ` Steffen Sledz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.