From ef7042dd9d1a4e509d20b08f8b9d696e1cfa2884 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 22 Jun 2021 17:15:14 +0200 Subject: [PATCH] finit: early log, "entering runlevel S", just after printing banner This patch adds "the missing" first runlevel log entry when Finit has printed the console banner and begins its bootstrap phase. At this point we know syslogd hasn't been started yet, so we rely on logit() to redirect this to /dev/kmsg in the meantime. Later syslogd will pick this up, see that it's not from the kernel, and log it to the proper log file. Signed-off-by: Joachim Wiberg --- src/finit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/finit.c b/src/finit.c index 055ad8dc..03e7a114 100644 --- a/src/finit.c +++ b/src/finit.c @@ -604,6 +604,11 @@ int main(int argc, char *argv[]) enable_progress(1); /* Allow progress, if enabled */ banner(); + if (osheading) + logit(LOG_CONSOLE | LOG_NOTICE, "%s, entering runlevel S", osheading); + else + logit(LOG_CONSOLE | LOG_NOTICE, "Entering runlevel S"); + /* * Initial setup of signals, ignore all until we're up. */