From 55f0377c4492bc4e3ab2ad36d70c8c3e32ea697b Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Fri, 28 Jun 2002 22:56:31 +0000 Subject: [PATCH] Simplify TERM handling since now libutil not overwrites existen TERM for "term" --- usr.bin/login/login.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index ab6f6d86e171..575963140f3f 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -531,9 +531,7 @@ main(int argc, char *argv[]) (void)setenv("SHELL", pwd->pw_shell, 1); (void)setenv("HOME", pwd->pw_dir, 1); /* Overwrite "term" from login.conf(5) for any known TERM */ - if (term != NULL) - (void)setenv("TERM", term, 1); - else if ((tp = stypeof(tty)) != NULL) + if (term == NULL && (tp = stypeof(tty)) != NULL) (void)setenv("TERM", tp, 1); else (void)setenv("TERM", TERM_UNKNOWN, 0);