mirror of
https://github.com/troglobit/finit.git
synced 2026-10-29 12:40:44 +00:00
Silence kernel output on console when starting up
Many systems have a very verbose kernel by default. This patch calls `klogctl(SYSLOG_ACTION_CONSOLE_OFF, NULL, 0)`, which is sysklogd also calls but later when it starts emptying /dev/kmsg. We do this to get an undisturbed console while starting up. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
9e73fda2ac
commit
84c6ab737e
1 file changed
+12
+12
@@ -31,6 +31,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <mntent.h>
|
#include <mntent.h>
|
||||||
#include <time.h> /* tzet() */
|
#include <time.h> /* tzet() */
|
||||||
|
#include <sys/klog.h>
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
#include <sys/stat.h> /* umask(), mkdir() */
|
#include <sys/stat.h> /* umask(), mkdir() */
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
@@ -72,6 +73,17 @@ svc_t *wdog = NULL; /* No watchdog by default */
|
|||||||
*/
|
*/
|
||||||
static void banner(void)
|
static void banner(void)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Silence kernel logs, assuming users have sysklogd or
|
||||||
|
* similar enabled to start emptying /dev/kmsg, but for
|
||||||
|
* our progress we want to own the console.
|
||||||
|
*/
|
||||||
|
klogctl(6, NULL, 0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* First level hooks, if you want to run here, you're
|
||||||
|
* pretty much on your own. Nothing's up yet ...
|
||||||
|
*/
|
||||||
plugin_run_hooks(HOOK_BANNER);
|
plugin_run_hooks(HOOK_BANNER);
|
||||||
|
|
||||||
if (log_is_silent())
|
if (log_is_silent())
|
||||||
|
|||||||
Reference in new issue
Block a user