#! /bin/sh

# /etc/init.d/console.sh - Initial console setup for Debian-Linux
# Copyright (C) 1996  Dominik Kubla, <Dominik.Kubla@Uni-Mainz.DE>

LIBDIR=/usr/lib/kbd

# For the new init setup, currently being discussed between MvS and me...
if [ -f /etc/kbd/config ]
then
	. /etc/kbd/config
else
	echo "kbd:  Warning: No config file found using defaults."
	echo "      Run /usr/sbin/kbdconfig to configure this package."
	CONSOLE=/dev/tty0
	TERM=linux
	KEYMAP=""
	SOFTFONT=""
fi

echo "Console setup:"

# Needed for serial consoles ...
echo " Linking /dev/console to $CONSOLE"
ln -sf $CONSOLE /dev/console

# Load keyboard map if specified...
if [ -n "$KEYMAP" -a "$KEYMAP" != "NONE" ]
then
	echo -n " "
	loadkeys $KEYMAP
fi

# Load soft font if specified...
if [ -n "$SOFTFONT" -a "$SOFTFONT" != "NONE" ]
then
	echo -n " "
	setfont $SOFTFONT
fi
