1 From 1c05303fdc302725093294eb0305adc003d52bcb Mon Sep 17 00:00:00 2001
2 From: Jeremie Koenig <jk@jk.fr.eu.org>
3 Date: Thu, 27 May 2010 15:46:07 +0200
4 Subject: [PATCH 5/9] init: make the initial $TERM value configurable
6 Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
9 init/Config.src | 12 ++++++++++++
11 2 files changed, 13 insertions(+), 1 deletions(-)
13 diff --git a/init/Config.src b/init/Config.src
14 index 590e298..2cac357 100644
17 @@ -89,6 +89,18 @@ config FEATURE_INITRD
18 This does not apply to initramfs, which runs /init as PID 1 and
19 requires no special support.
21 +config INIT_TERMINAL_TYPE
22 + string "Initial terminal type"
26 + This is the initial value set by init for the TERM environment
27 + variable. This variable is used by programs which make use of
28 + extended terminal capabilities.
30 + Note that on Linux, init attempts to detect serial terminal and
31 + sets TERM to "vt102" if one is found.
34 bool "poweroff, halt, and reboot"
36 diff --git a/init/init.c b/init/init.c
37 index d8bf158..fa1af6d 100644
40 @@ -205,7 +205,7 @@ static void console_init(void)
44 - putenv((char*)"TERM=linux");
45 + putenv((char*)"TERM=" CONFIG_INIT_TERMINAL_TYPE);
48 /* Set terminal settings to reasonable defaults.