-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
busybox: Hide shutdown message from users
When kexec-ing to the next kernel a user will see a scary message about shutting down the system: The system is going down NOW! Sent SIGTERM to all processes Sent SIGKILL to all processes This patch suppresses those messages. Resolves #2385 Signed-off-by: Joel Stanley <joel@jms.id.au>
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
openpower/patches/busybox/0001-init-Only-print-shutdown-messages-to-log.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From eb48b173dc3d09db483b97c4210303eee27df1db Mon Sep 17 00:00:00 2001 | ||
From: Joel Stanley <joel@jms.id.au> | ||
Date: Thu, 25 Oct 2018 15:18:56 +1030 | ||
Subject: [PATCH] init: Only print shutdown messages to log | ||
|
||
We disable them from appearing on the console so users are not confused | ||
as the system kexec's to the next kernel. This suppresses these | ||
messages: | ||
|
||
The system is going down NOW! | ||
Sent SIGTERM to all processes | ||
Sent SIGKILL to all processes | ||
|
||
Signed-off-by: Joel Stanley <joel@jms.id.au> | ||
--- | ||
init/init.c | 6 +++--- | ||
1 file changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/init/init.c b/init/init.c | ||
index 6439e2bcd862..11561143e5f1 100644 | ||
--- a/init/init.c | ||
+++ b/init/init.c | ||
@@ -763,16 +763,16 @@ static void run_shutdown_and_kill_processes(void) | ||
* shut things down gracefully... */ | ||
run_actions(SHUTDOWN); | ||
|
||
- message(L_CONSOLE | L_LOG, "The system is going down NOW!"); | ||
+ message(L_LOG, "The system is going down NOW!"); | ||
|
||
/* Send signals to every process _except_ pid 1 */ | ||
kill(-1, SIGTERM); | ||
- message(L_CONSOLE, "Sent SIG%s to all processes", "TERM"); | ||
+ message(L_LOG, "Sent SIG%s to all processes", "TERM"); | ||
sync(); | ||
sleep(1); | ||
|
||
kill(-1, SIGKILL); | ||
- message(L_CONSOLE, "Sent SIG%s to all processes", "KILL"); | ||
+ message(L_LOG, "Sent SIG%s to all processes", "KILL"); | ||
sync(); | ||
/*sleep(1); - callers take care about making a pause */ | ||
} | ||
-- | ||
2.19.1 | ||
|