summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2013-08-07 16:43:40 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-12 13:09:52 +0100
commit86d8d89c2101a9f6903949583751f95e75593105 (patch)
treee643bd00ab3bb50355fba84e34ea4cd16e0c7f73 /meta/recipes-core
parent290a5aef1f1de389d2c6432e659627f229cc44fb (diff)
downloadast2050-yocto-poky-86d8d89c2101a9f6903949583751f95e75593105.zip
ast2050-yocto-poky-86d8d89c2101a9f6903949583751f95e75593105.tar.gz
busybox: remove syslog-startup.conf if sysvinit not in DISTRO_FEATURES
sysvinit and systemd have different ideas about configuration files (or environment files in systemd), so basically we can't use the same one in both cases. To avoid confusion, this patch removes syslog-startup.conf if 'sysvinit' is not in DISTRO_FEATURES. [YOCTO #4837] [YOCTO #4860] (From OE-Core rev: 89f62147a61108b4be40001e1fbe3be33bacf00b) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/busybox/busybox.inc13
1 files changed, 8 insertions, 5 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 2f26953..8b38c1a 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -274,25 +274,28 @@ do_install () {
ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
fi
+
+ # Remove the sysvinit specific configuration file for systemd systems to avoid confusion
+ if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
+ rm ${D}${sysconfdir}/syslog-startup.conf.${BPN}
+ fi
}
inherit update-alternatives
ALTERNATIVE_PRIORITY = "50"
-ALTERNATIVE_${PN}-syslog = "syslog-startup-conf"
-
python () {
if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split():
pn = d.getVar('PN', True)
d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-init')
d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir', True)))
d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True)))
+ 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)))
}
-ALTERNATIVE_LINK_NAME[syslog-startup-conf] = "${sysconfdir}/syslog-startup.conf"
-ALTERNATIVE_TARGET[syslog-startup-conf] = "${sysconfdir}/syslog-startup.conf.${BPN}"
-
python do_package_prepend () {
# We need to load the full set of busybox provides from the /etc/busybox.links
# Use this to see the update-alternatives with the right information
OpenPOWER on IntegriCloud