aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/busybox/busybox.inc')
-rw-r--r--meta/recipes-core/busybox/busybox.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index bd66e4f148..a6b205ac50 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -274,13 +274,12 @@ do_install () {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
install -d ${D}${systemd_unitdir}/system
- sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
+ sed -e 's,@base_sbindir@,${base_sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' < ${WORKDIR}/busybox-syslog.service.in \
> ${D}${systemd_unitdir}/system/busybox-syslog.service
if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
install -d ${D}${sysconfdir}/default
install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
fi
- ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
fi
if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
install -d ${D}${systemd_unitdir}/system
@@ -311,6 +310,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-syslog' % (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 () {