about summary refs log tree commit diff
path: root/core-services/06-console-setup.sh
blob: 63fea25b332eedb6c76b993d2adf442a7bfba26b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# vim: set ts=4 sw=4 et:

. /etc/runit/functions
[ -r /etc/rc.conf ] && . /etc/rc.conf

[ -n "$VIRTUALIZATION" ] && return 0

msg "Setting up TTYs to unicode mode...\n"
for i in /dev/tty[0-6]; do
    unicode_start < $i
done

if [ -n "$FONT" ]; then
    msg "Setting up TTYs font to '${FONT}'...\n"
    for i in /dev/tty[0-6]; do
        setfont ${FONT_MAP:+-m $FONT_MAP} ${FONT_UNIMAP:+-u $FONT_UNIMAP} $FONT -C $i
    done
fi

msg "Setting up keymap to '${KEYMAP:-us}'...\n"
loadkeys -q -u ${KEYMAP:-us}