On 1/8/20 2:33 AM, [email protected] wrote:
From: Yanfei Xu <[email protected]>

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 <[email protected]>
---
  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}

This might be a sensible work-around for the 3.0/zeus releaese but
for the master branch it is not acceptable.

A delay is often a work-around especially if it's a round number like 1 second.
A slower machine may not be fixed by a 2 second delay and so we'd be
tempted to delay 2 or 10 seconds, soon enough your system is only fully
initialized after a fortnight. ;-)

Also and more importantly we should be looking at what upstream is doing and
for sysklogd, they are _removing_ klogd:

https://github.com/troglobit/sysklogd/commits/6bb6672ebf797078d1c31c83dcf960f767808557

    Remove klogd from the sysklogd project

        This patch removes one of the traditionally key pieces of the sysklogd
        project, klogd.  Now that syslogd performs logging of kernel messages
        we no longer require a separate daemon for that.

        Signed-off-by: Joachim Nilsson <[email protected]>


The question to answer is, do all the syslog daemons:
 - syslogd
 - rsyslogd
 - systemd/journald
 - others?
have the support that we klogd provides.
--
# Randy MacLeod
# Wind River Linux

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to