diff options
-rw-r--r-- | init/Config.src | 12 | ||||
-rw-r--r-- | init/init.c | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/init/Config.src b/init/Config.src index 590e29890..2cac3573e 100644 --- a/init/Config.src +++ b/init/Config.src | |||
@@ -89,6 +89,18 @@ config FEATURE_INITRD | |||
89 | This does not apply to initramfs, which runs /init as PID 1 and | 89 | This does not apply to initramfs, which runs /init as PID 1 and |
90 | requires no special support. | 90 | requires no special support. |
91 | 91 | ||
92 | config INIT_TERMINAL_TYPE | ||
93 | string "Initial terminal type" | ||
94 | default "linux" | ||
95 | depends on INIT | ||
96 | help | ||
97 | This is the initial value set by init for the TERM environment | ||
98 | variable. This variable is used by programs which make use of | ||
99 | extended terminal capabilities. | ||
100 | |||
101 | Note that on Linux, init attempts to detect serial terminal and | ||
102 | sets TERM to "vt102" if one is found. | ||
103 | |||
92 | config HALT | 104 | config HALT |
93 | bool "poweroff, halt, and reboot" | 105 | bool "poweroff, halt, and reboot" |
94 | default y | 106 | default y |
diff --git a/init/init.c b/init/init.c index d8bf15894..fa1af6d7c 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -205,7 +205,7 @@ static void console_init(void) | |||
205 | } else | 205 | } else |
206 | #endif | 206 | #endif |
207 | if (!s) | 207 | if (!s) |
208 | putenv((char*)"TERM=linux"); | 208 | putenv((char*)"TERM=" CONFIG_INIT_TERMINAL_TYPE); |
209 | } | 209 | } |
210 | 210 | ||
211 | /* Set terminal settings to reasonable defaults. | 211 | /* Set terminal settings to reasonable defaults. |