[oe-commits] [openembedded-core] 10/49: busybox: handle syslog

git at git.openembedded.org git at git.openembedded.org
Thu Jul 28 20:56:03 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 1d260e2f776bcb509a1ba81f6dbe37a53559a3b6
Author: mingli.yu at windriver.com <mingli.yu at windriver.com>
AuthorDate: Tue Jul 26 15:33:19 2016 +0800

    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.
    
    Signed-off-by: Yadi.hu <yadi.hu at windriver.com>
    Signed-off-by: Mingli Yu <mingli.yu at windriver.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-core/busybox/busybox.inc | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 2865b36..acb96ad 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -293,20 +293,24 @@ do_install () {
         fi
 
     if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
+            install -d ${D}${systemd_unitdir}/system
+            sed 's, at base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
+            > ${D}${systemd_unitdir}/system/busybox-klogd.service
+        fi
+
         if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
             install -d ${D}${systemd_unitdir}/system
             sed -e 's, at base_sbindir@,${base_sbindir},g' -e 's, at SYSCONFDIR@,${sysconfdir},g' < ${WORKDIR}/busybox-syslog.service.in \
 		> ${D}${systemd_unitdir}/system/busybox-syslog.service
+            if  [ ! -e ${D}${systemd_unitdir}/system/busybox-klogd.service ] ; then
+                sed -i '/klog/d' ${D}${systemd_unitdir}/system/busybox-syslog.service
+            fi
             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
         fi
-        if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
-            install -d ${D}${systemd_unitdir}/system
-            sed 's, at base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
-		> ${D}${systemd_unitdir}/system/busybox-klogd.service
-        fi
     fi
 
     # Remove the sysvinit specific configuration file for systemd systems to avoid confusion

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list