mirror of
https://github.com/troglobit/finit.git
synced 2026-10-30 12:50:34 +00:00
getty: Set $TERM environment variable if given in tty config
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
b8a7cb6b93
commit
8eea64cebf
1 file changed
+2
@@ -341,6 +341,8 @@ int getty(char *tty, char *baud, char *term, char *user)
|
|||||||
stty(fd, speed);
|
stty(fd, speed);
|
||||||
close(fd);
|
close(fd);
|
||||||
utmp_set_login(tty, NULL);
|
utmp_set_login(tty, NULL);
|
||||||
|
if (term)
|
||||||
|
setenv("TERM", term, 1);
|
||||||
|
|
||||||
if (!user)
|
if (!user)
|
||||||
do_getty(tty, name, sizeof(name));
|
do_getty(tty, name, sizeof(name));
|
||||||
|
|||||||
Reference in new issue
Block a user