Joel Stanley | 61d9a2e | 2018-10-25 15:54:47 +1030 | [diff] [blame] | 1 | From eb48b173dc3d09db483b97c4210303eee27df1db Mon Sep 17 00:00:00 2001 |
| 2 | From: Joel Stanley <joel@jms.id.au> |
| 3 | Date: Thu, 25 Oct 2018 15:18:56 +1030 |
| 4 | Subject: [PATCH] init: Only print shutdown messages to log |
| 5 | |
| 6 | We disable them from appearing on the console so users are not confused |
| 7 | as the system kexec's to the next kernel. This suppresses these |
| 8 | messages: |
| 9 | |
| 10 | The system is going down NOW! |
| 11 | Sent SIGTERM to all processes |
| 12 | Sent SIGKILL to all processes |
| 13 | |
| 14 | Signed-off-by: Joel Stanley <joel@jms.id.au> |
| 15 | --- |
| 16 | init/init.c | 6 +++--- |
| 17 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 18 | |
| 19 | diff --git a/init/init.c b/init/init.c |
| 20 | index 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 | -- |
| 44 | 2.19.1 |
| 45 | |