aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/termcap.c
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1996-09-26 21:07:11 +0000
committerPaul Traina <pst@FreeBSD.org>1996-09-26 21:07:11 +0000
commit09bef27f97f8968d7731b3afcfe8d3b8d8b76ff4 (patch)
tree148d468cb6aed490402c77706c933a587ee203d2 /usr.sbin/sysinstall/termcap.c
parent5319e113ebda1cb478fbbbf9a76fcb97d54a394a (diff)
Notes
Diffstat (limited to 'usr.sbin/sysinstall/termcap.c')
-rw-r--r--usr.sbin/sysinstall/termcap.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/termcap.c b/usr.sbin/sysinstall/termcap.c
index 06aca6cd1e14..5771e5f44eb6 100644
--- a/usr.sbin/sysinstall/termcap.c
+++ b/usr.sbin/sysinstall/termcap.c
@@ -33,7 +33,6 @@ set_termcap(void)
int stat;
struct ttysize ts;
- OnVTY = FALSE;
term = getenv("TERM");
stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay);
@@ -43,7 +42,7 @@ set_termcap(void)
DebugFD = open("/dev/null", O_RDWR, 0);
}
- if (stat < 0) {
+ if (!OnVTY || (stat < 0)) {
if (!term) {
if (setenv("TERM", "vt100", 1) < 0)
return -1;
@@ -78,7 +77,6 @@ set_termcap(void)
return -1;
}
}
- OnVTY = TRUE;
}
if (ioctl(0, TIOCGSIZE, &ts) == -1) {
msgDebug("Unable to get terminal size - errno %d\n", errno);