core: inherit TERM from PID 1 for all services started on /dev/console

This way, invoking nspawn from a shell in the best case inherits the TERM
setting all the way down into the login shell spawned in the container.

Fixes: #3697
This commit is contained in:
Lennart Poettering
2016-08-03 14:52:16 +02:00
parent 43992e57e0
commit 6af760f3b2
3 changed files with 45 additions and 19 deletions
+1 -1
View File
@@ -785,7 +785,7 @@ bool tty_is_vc_resolve(const char *tty) {
}
const char *default_term_for_tty(const char *tty) {
return tty && tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt220";
return tty && tty_is_vc_resolve(tty) ? "linux" : "vt220";
}
int fd_columns(int fd) {