[OE-core] [PATCH] sysklogd: add a delay before klogd connect syslogd

yanfei.xu at windriver.com yanfei.xu at windriver.com
Wed Jan 8 07:33:26 UTC 2020

From: Yanfei Xu <yanfei.xu at windriver.com>

klogd and syslogd's type has been changed from "forking" to "simple"
in service file used by systemd. It causes klogd will boot on the
heels of syslogd in a very short time and result in a empty kern.log.

Adding a delay before klogd connecting syslogd can solve this.
steps to reproduce:
    Bitbake core-image-minimal  with configuration as follow:
    MACHINE ??= "genericx86-64"
    DISTRO_FEATURES_append = " systemd"
    VIRTUAL-RUNTIME_init_manager = "systemd"
    VIRTUAL-RUNTIME_base-utils-syslog = "sysklogd"

After your system booting successfully, you will find /var/log/kern.log
is empty.

Signed-off-by: Yanfei Xu <yanfei.xu at windriver.com>
 meta/recipes-extended/sysklogd/sysklogd.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index 774d23b..ff8188d 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -21,7 +21,7 @@ SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \
 S = "${WORKDIR}/git"
-EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --with-klogd --without-logger"
+EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --with-klogd --with-klogd-delay=1 --without-logger"
 do_install_append () {
        install -d ${D}${sysconfdir}

More information about the Openembedded-core mailing list