#!/bin/sh

if test "$TERM" = "" -o "$TERM" = "unknown"; then
    TERM=linux
    echo "* Setting TERM='$TERM'"
fi
export TERM

exit 0

# Example: if we are on Linux console, 
# load alternate keyboard mapping and font

ttyname=`tty`
ttybase="${ttyname%%[0123456789]*}"     # strip numeric tail

if test "$ttybase" = "/dev/vc/" -o "$ttybase" = "/dev/tty"; then
    echo "* Activating Cyrillic KOI8-R -> CP866 font map"
    echo -ne "\033(K"
    echo "* Loading screen font"
    setfont -C "$ttyname" \
	-f -m koi8-r_to_uni.trans -u cp866.uni \
	/usr/app/kbd-1.12/share/alt08x16.fnt \
    || echo "! setfont failure"
    echo "* Loading keymap"
    loadkeys /usr/app/kbd-1.12/share/ru_koi8r.keymap \
    || echo "! loadkeys failure"
fi
