getty: Set $TERM environment variable if given in tty config

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-09-01 06:41:22 +02:00
parent b8a7cb6b93
commit 8eea64cebf
+2
View File
@@ -341,6 +341,8 @@ int getty(char *tty, char *baud, char *term, char *user)
stty(fd, speed);
close(fd);
utmp_set_login(tty, NULL);
if (term)
setenv("TERM", term, 1);
if (!user)
do_getty(tty, name, sizeof(name));