summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.c6
-rw-r--r--init/init.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/init.c b/init.c
index a3e165e..4a19822 100644
--- a/init.c
+++ b/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");
}
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");
}