aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2024-04-22 12:05:20 +0200
committerKarel Zak <kzak@redhat.com>2024-04-22 12:05:20 +0200
commitb767e81123885d8ced90d7d5e5ac92cebe6607ba (patch)
tree39492b1b63c6a242ce2bb45ec9b20b7694567a19
parent6c274b0a1409c6f32d722911bb09e80a598b223b (diff)
parentaf354e92111769d57e43eb4f1825c0d99c894ddb (diff)
downloadutil-linux-b767e81123885d8ced90d7d5e5ac92cebe6607ba.tar.gz
Merge branch 'fix' of https://github.com/DaanDeMeyer/util-linux
* 'fix' of https://github.com/DaanDeMeyer/util-linux: agetty: Don't override TERM passed by the user
-rw-r--r--term-utils/agetty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index ff5123dbf6..6d461b6f1f 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -1196,7 +1196,8 @@ static void open_tty(const char *tty, struct termios *tp, struct options *op)
#endif
}
- op->term = get_terminal_default_type(op->tty, !(op->flags & F_VCONSOLE));
+ if (!op->term)
+ op->term = get_terminal_default_type(op->tty, !(op->flags & F_VCONSOLE));
if (!op->term)
log_err(_("failed to allocate memory: %m"));