init: make the initial $TERM value configurable
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
714674e4da
commit
1c05303fdc
@ -89,6 +89,18 @@ config FEATURE_INITRD
|
|||||||
This does not apply to initramfs, which runs /init as PID 1 and
|
This does not apply to initramfs, which runs /init as PID 1 and
|
||||||
requires no special support.
|
requires no special support.
|
||||||
|
|
||||||
|
config INIT_TERMINAL_TYPE
|
||||||
|
string "Initial terminal type"
|
||||||
|
default "linux"
|
||||||
|
depends on INIT
|
||||||
|
help
|
||||||
|
This is the initial value set by init for the TERM environment
|
||||||
|
variable. This variable is used by programs which make use of
|
||||||
|
extended terminal capabilities.
|
||||||
|
|
||||||
|
Note that on Linux, init attempts to detect serial terminal and
|
||||||
|
sets TERM to "vt102" if one is found.
|
||||||
|
|
||||||
config HALT
|
config HALT
|
||||||
bool "poweroff, halt, and reboot"
|
bool "poweroff, halt, and reboot"
|
||||||
default y
|
default y
|
||||||
|
@ -205,7 +205,7 @@ static void console_init(void)
|
|||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (!s)
|
if (!s)
|
||||||
putenv((char*)"TERM=linux");
|
putenv((char*)"TERM=" CONFIG_INIT_TERMINAL_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set terminal settings to reasonable defaults.
|
/* Set terminal settings to reasonable defaults.
|
||||||
|
Loading…
Reference in New Issue
Block a user