main: show different welcome msg in initrd than on the host
It has bugged me for a while that we show the exact same welcome message at boot twice: once in the initrd, and once after the initrd→host transition. That's very confusing. Let's change the text a bit, and tone down the initrd message a bit (by removing the empty line before and after it), because it is the less relevant one.
This commit is contained in:
+19
-9
@@ -1399,17 +1399,27 @@ static int os_release_status(void) {
|
||||
"Failed to read os-release file, ignoring: %m");
|
||||
|
||||
const char *label = os_release_pretty_name(pretty_name, name);
|
||||
const char *color = empty_to_null(ansi_color) ?: "1";
|
||||
|
||||
if (show_status_on(arg_show_status)) {
|
||||
if (log_get_show_color())
|
||||
status_printf(NULL, 0,
|
||||
"\nWelcome to \x1B[%sm%s\x1B[0m!\n",
|
||||
empty_to_null(ansi_color) ?: "1",
|
||||
label);
|
||||
else
|
||||
status_printf(NULL, 0,
|
||||
"\nWelcome to %s!\n",
|
||||
label);
|
||||
if (in_initrd()) {
|
||||
if (log_get_show_color())
|
||||
status_printf(NULL, 0,
|
||||
ANSI_HIGHLIGHT "Booting initrd of " ANSI_NORMAL "\x1B[%sm%s" ANSI_NORMAL ANSI_HIGHLIGHT "." ANSI_NORMAL,
|
||||
color, label);
|
||||
else
|
||||
status_printf(NULL, 0,
|
||||
"Booting initrd of %s...", label);
|
||||
} else {
|
||||
if (log_get_show_color())
|
||||
status_printf(NULL, 0,
|
||||
"\n" ANSI_HIGHLIGHT "Welcome to " ANSI_NORMAL "\x1B[%sm%s" ANSI_NORMAL ANSI_HIGHLIGHT "!" ANSI_NORMAL "\n",
|
||||
color, label);
|
||||
else
|
||||
status_printf(NULL, 0,
|
||||
"\nWelcome to %s!\n",
|
||||
label);
|
||||
}
|
||||
}
|
||||
|
||||
if (support_end && os_release_support_ended(support_end, /* quiet */ false, NULL) > 0)
|
||||
|
||||
Reference in New Issue
Block a user