From ea94da805a46262a9271f9bc7d839839ca2331eb Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 8 May 2023 10:03:09 +0200 Subject: [PATCH] sulogin: Don't overwrite TERM if already set The service invoking sulogin might already have set TERM to something useful so if that's the case let's not overwrite it. --- login-utils/sulogin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index 98147509c3..45a558d3ea 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -274,18 +274,18 @@ static void tcfinal(struct console *con) if (con->flags & CON_EIO) return; if ((con->flags & CON_SERIAL) == 0) { - xsetenv("TERM", "linux", 1); + xsetenv("TERM", "linux", 0); return; } if (con->flags & CON_NOTTY) { - xsetenv("TERM", "dumb", 1); + xsetenv("TERM", "dumb", 0); return; } #if defined (__s390__) || defined (__s390x__) - xsetenv("TERM", "dumb", 1); + xsetenv("TERM", "dumb", 0); #else - xsetenv("TERM", "vt102", 1); + xsetenv("TERM", "vt102", 0); #endif tio->c_iflag |= (IXON | IXOFF); tio->c_lflag |= (ICANON | ISIG | ECHO|ECHOE|ECHOK|ECHOKE); -- 2.47.2