mirror of
https://github.com/troglobit/finit.git
synced 2026-11-19 19:40:50 +00:00
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 <troglobit@gmail.com>
This commit is contained in:
1 parent
3d50a28fe3
commit
1020695ebd
1 file changed
+3
-3
+3
-3
@@ -311,12 +311,12 @@ static int activate_console(int noclear, int nowait)
|
|||||||
struct termios orig;
|
struct termios orig;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
if (nowait || rescue)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (!noclear)
|
if (!noclear)
|
||||||
(void)write(STDERR_FILENO, "\e[r\e[H\e[J", 9);
|
(void)write(STDERR_FILENO, "\e[r\e[H\e[J", 9);
|
||||||
|
|
||||||
if (nowait)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
/* Disable ECHO, XON/OFF while waiting for <CR> */
|
/* Disable ECHO, XON/OFF while waiting for <CR> */
|
||||||
if (!tcgetattr(STDIN_FILENO, &orig)) {
|
if (!tcgetattr(STDIN_FILENO, &orig)) {
|
||||||
struct termios c = orig;
|
struct termios c = orig;
|
||||||
|
|||||||
Reference in new issue
Block a user