blob: 89efe07513e1c2fa3c068b35d0824fe226b36afe [file] [log] [blame]
Joel Stanley23588bd2021-07-16 09:10:22 +09301From 1939276efa4a12ef9e14ea139a525c887de2bb77 Mon Sep 17 00:00:00 2001
Joel Stanley61d9a2e2018-10-25 15:54:47 +10302From: Joel Stanley <joel@jms.id.au>
3Date: Thu, 25 Oct 2018 15:18:56 +1030
4Subject: [PATCH] init: Only print shutdown messages to log
5
6We disable them from appearing on the console so users are not confused
7as the system kexec's to the next kernel. This suppresses these
8messages:
9
10 The system is going down NOW!
11 Sent SIGTERM to all processes
12 Sent SIGKILL to all processes
13
14Signed-off-by: Joel Stanley <joel@jms.id.au>
15---
16 init/init.c | 6 +++---
17 1 file changed, 3 insertions(+), 3 deletions(-)
18
19diff --git a/init/init.c b/init/init.c
Joel Stanley23588bd2021-07-16 09:10:22 +093020index efab5dcb44c0..afac0fd7dee5 100644
Joel Stanley61d9a2e2018-10-25 15:54:47 +103021--- a/init/init.c
22+++ b/init/init.c
Joel Stanley23588bd2021-07-16 09:10:22 +093023@@ -762,16 +762,16 @@ static void run_shutdown_and_kill_processes(void)
Joel Stanley61d9a2e2018-10-25 15:54:47 +103024 * shut things down gracefully... */
25 run_actions(SHUTDOWN);
26
27- message(L_CONSOLE | L_LOG, "The system is going down NOW!");
28+ message(L_LOG, "The system is going down NOW!");
29
30 /* Send signals to every process _except_ pid 1 */
31 kill(-1, SIGTERM);
32- message(L_CONSOLE, "Sent SIG%s to all processes", "TERM");
33+ message(L_LOG, "Sent SIG%s to all processes", "TERM");
34 sync();
Joel Stanley23588bd2021-07-16 09:10:22 +093035 sleep1();
Joel Stanley61d9a2e2018-10-25 15:54:47 +103036
37 kill(-1, SIGKILL);
38- message(L_CONSOLE, "Sent SIG%s to all processes", "KILL");
39+ message(L_LOG, "Sent SIG%s to all processes", "KILL");
40 sync();
Joel Stanley23588bd2021-07-16 09:10:22 +093041 /*sleep1(); - callers take care about making a pause */
Joel Stanley61d9a2e2018-10-25 15:54:47 +103042 }
43--
Joel Stanley23588bd2021-07-16 09:10:22 +0930442.32.0
Joel Stanley61d9a2e2018-10-25 15:54:47 +103045