blob: 196567ae1f37c0bfd74ed18fa1ecea8f925b0f25 [file] [log] [blame]
Joel Stanley61d9a2e2018-10-25 15:54:47 +10301From eb48b173dc3d09db483b97c4210303eee27df1db Mon Sep 17 00:00:00 2001
2From: 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
20index 6439e2bcd862..11561143e5f1 100644
21--- a/init/init.c
22+++ b/init/init.c
23@@ -763,16 +763,16 @@ static void run_shutdown_and_kill_processes(void)
24 * 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();
35 sleep(1);
36
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();
41 /*sleep(1); - callers take care about making a pause */
42 }
43--
442.19.1
45