#!/bin/sh
# $Owl: Owl/packages/kbd/keytable.init,v 1.3 2005/11/16 13:11:15 solar Exp $
#
# Load keytable
#
# chkconfig: 2345 75 05
# description: \
#	This package loads the selected keyboard map as set in \
#	/etc/sysconfig/keyboard.
# config: /etc/sysconfig/keyboard

RETVAL=0

case "$1" in
start|restart|reload)
	test -f /etc/sysconfig/keyboard -a -x /bin/loadkeys || exit 0
	. /etc/sysconfig/keyboard
	if [ "${KEYTABLE:-bogus}" != "bogus" ]; then
	# Specify VT0 in case we use a serial console
		/bin/loadkeys $KEYTABLE < /dev/tty0 > /dev/tty0
		RETVAL=$?
	fi
	if [ -x /sbin/setsysfont ]; then
		/sbin/setsysfont
	fi
	;;
stop)
	;;
status)
	echo "No status available for this package"
	;;
*)
	echo "Usage: keytable {start|stop|restart|reload|status}"
	exit 1
	;;
esac

exit $RETVAL
