summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox.inc
diff options
context:
space:
mode:
authorYadi.hu <yadi.hu@windriver.com>2016-06-01 17:54:17 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-09 22:48:38 +0100
commit53ba34d1438981d3c8f47cbaaa91aeca51df4bcf (patch)
treee4a228ce7999bd4b00d83dc9058bf69de23cd0b1 /meta/recipes-core/busybox/busybox.inc
parent9b034e9a83a58077519ba57ced482662f973a467 (diff)
downloadpoky-53ba34d1438981d3c8f47cbaaa91aeca51df4bcf.tar.gz
busybox: handle syslog
If CONFIG_KLOGD is not enabled, then the related service file should not be installed, The error message is below: Cannot add dependency job for unit busybox-klogd.service, ignoring: Unit busybox-klogd.service failed to load: No such file or directory. So we should first check the configuration before we install these service files. (From OE-Core rev: c3cc402df996654bf6f838b1e79e16a8bdd6d4d7) Signed-off-by: Yadi.hu <yadi.hu@windriver.com> Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox/busybox.inc')
-rw-r--r--meta/recipes-core/busybox/busybox.inc14
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index d1675c37aa..8c6dbbaf9b 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -315,20 +315,24 @@ do_install () {
315 fi 315 fi
316 316
317 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 317 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
318 if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
319 install -d ${D}${systemd_unitdir}/system
320 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
321 > ${D}${systemd_unitdir}/system/busybox-klogd.service
322 fi
323
318 if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then 324 if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
319 install -d ${D}${systemd_unitdir}/system 325 install -d ${D}${systemd_unitdir}/system
320 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \ 326 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
321 > ${D}${systemd_unitdir}/system/busybox-syslog.service 327 > ${D}${systemd_unitdir}/system/busybox-syslog.service
328 if [ ! -e ${D}${systemd_unitdir}/system/busybox-klogd.service ] ; then
329 sed -i '/klog/d' ${D}${systemd_unitdir}/system/busybox-syslog.service
330 fi
322 if [ -f ${WORKDIR}/busybox-syslog.default ] ; then 331 if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
323 install -d ${D}${sysconfdir}/default 332 install -d ${D}${sysconfdir}/default
324 install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog 333 install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
325 fi 334 fi
326 fi 335 fi
327 if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
328 install -d ${D}${systemd_unitdir}/system
329 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
330 > ${D}${systemd_unitdir}/system/busybox-klogd.service
331 fi
332 fi 336 fi
333 337
334 # Remove the sysvinit specific configuration file for systemd systems to avoid confusion 338 # Remove the sysvinit specific configuration file for systemd systems to avoid confusion