From f2bcda5183e22c8d7a477504a264669109da6c7e Mon Sep 17 00:00:00 2001 From: Werner Fink Date: Thu, 8 May 2014 12:09:24 +0200 Subject: agetty: better support of the special system consoles on S390 That is that there are several consoles, the /dev/ttyS0 which is type of ibm3215 and a dumb terminal, then there is the device /dev/3270/tty1 which can handle ANSI color escape sequences and is a ibm327x terminal, and the /dev/ttyS1 which is a vt220 terminal. The macro is_speed() in agetty.c allows to distinguish between the terminal line (/dev)3270/tty1 and the speed options on the command line used in /run/systemd/generator/getty.target.wants/serial-getty@3270-tty1.service which is a symbolic link to /usr/lib/systemd/system/serial-getty@.service Signed-off-by: Werner Fink --- login-utils/sulogin.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'login-utils/sulogin.c') diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index 1e227a863..147e6338f 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -231,10 +231,16 @@ static void tcfinal(struct console *con) setenv("TERM", "linux", 1); return; } - if (con->flags & CON_NOTTY) + if (con->flags & CON_NOTTY) { + setenv("TERM", "dumb", 1); return; + } +#if defined (__s390__) || defined (__s390x__) + setenv("TERM", "dumb", 1); +#else setenv("TERM", "vt102", 1); +#endif tio = &con->tio; fd = con->fd; -- cgit v1.2.3-55-g7522