firstboot: reset terminal settings right before asking a question

We are about to do interactivity on the terminal, hence let's ensure we
are in the TTY mode we expect to be in.
This commit is contained in:
Lennart Poettering
2023-11-22 13:27:53 +01:00
parent d5b6c6e378
commit 5fee4ac0f4
+2
View File
@@ -131,6 +131,8 @@ static void print_welcome(int rfd) {
pn = os_release_pretty_name(pretty_name, os_name);
ac = isempty(ansi_color) ? "0" : ansi_color;
(void) reset_terminal_fd(STDIN_FILENO, /* switch_to_text= */ false);
if (colors_enabled())
printf("\nWelcome to your new installation of \x1B[%sm%s\x1B[0m!\n", ac, pn);
else