From 1020695ebde624bc9245db630ee75a69a3032571 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 28 Feb 2021 21:27:16 +0100 Subject: [PATCH] Skip termios setup of TTY in rescue mode This patch fixes an issue with rescue mode on Alpine Linux where the rescue shell was never properly started. Signed-off-by: Joachim Wiberg --- src/exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/exec.c b/src/exec.c index bccb4370..cc2fc40f 100644 --- a/src/exec.c +++ b/src/exec.c @@ -311,12 +311,12 @@ static int activate_console(int noclear, int nowait) struct termios orig; int ret = 0; + if (nowait || rescue) + return 1; + if (!noclear) (void)write(STDERR_FILENO, "\e[r\e[H\e[J", 9); - if (nowait) - return 1; - /* Disable ECHO, XON/OFF while waiting for */ if (!tcgetattr(STDIN_FILENO, &orig)) { struct termios c = orig;