| 1 |
export LANG=C |
| 2 |
|
| 3 |
if [ "$TERM" = vt102 -a `tty` = /dev/tty1 ] ; then |
| 4 |
# Busybox's init uses a global TERM across all consoles. |
| 5 |
# If the serial console is the default such as on arm64, that |
| 6 |
# will force vt102 on the Linux VT. Fix this back so we get |
| 7 |
# colors, utf-8, etc. |
| 8 |
TERM=linux |
| 9 |
fi |
| 10 |
|
| 11 |
if [ "$TERM" = linux ] ; then |
| 12 |
if [ "$TERM_TYPE" = virtual ]; then |
| 13 |
echo -ne "\033[9;0]" # Turn off console blanking. |
| 14 |
fi |
| 15 |
|
| 16 |
# Enable UTF-8 locale if it is available |
| 17 |
if [ -d /usr/lib/locale/C.UTF-8 ]; then |
| 18 |
TERM_UTF8=yes |
| 19 |
: >/var/lib/UTF-8 |
| 20 |
export LANG=C.UTF-8 |
| 21 |
if [ "$TERM_TYPE" = virtual ]; then |
| 22 |
echo -ne "\033%G" # Enable UTF-8 console |
| 23 |
fi |
| 24 |
fi |
| 25 |
fi |