summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorErik Andersen2000-02-21 19:25:12 +0000
committerErik Andersen2000-02-21 19:25:12 +0000
commitfa4718efcf055d8720ea99be1af237a921232f5a (patch)
tree9315aca282f73ea18da3588a7328d4233a18e8c2 /init
parent42387e496463f6dbba168b5d36807b858f94fa96 (diff)
downloadbusybox-fa4718efcf055d8720ea99be1af237a921232f5a.zip
busybox-fa4718efcf055d8720ea99be1af237a921232f5a.tar.gz
Minor update for handling TERM with serial consoles.
-Erik
Diffstat (limited to 'init')
-rw-r--r--init/init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c
index a3e165e..4a19822 100644
--- a/init/init.c
+++ b/init/init.c
@@ -314,8 +314,10 @@ static void console_init()
if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
log = NULL;
secondConsole = NULL;
- /* Force the TERM setting to vt102 for serial console */
- snprintf(termType, sizeof(termType) - 1, "TERM=vt102");
+ /* Force the TERM setting to vt102 for serial console --
+ * iff TERM is set to linux (the default) */
+ if (strcmp( termType, "TERM=linux" ) == 0)
+ snprintf(termType, sizeof(termType) - 1, "TERM=vt102");
message(LOG | CONSOLE,
"serial console detected. Disabling virtual terminals.\r\n");
}