#!/bin/sh # # Load keytable # # chkconfig: 12345 17 05 # description: This package loads the selected keyboard map as set in \ # /etc/sysconfig/keyboard. This can be selected using the kbdconfig \ # utility. You should leave this enabled for most machines. # config: /etc/sysconfig/keyboard [ -f /etc/sysconfig/keyboard ] || exit 0 [ -f /bin/loadkeys ] || exit 0 . /etc/init.d/functions RETVAL=$? start() { # Load the proper keymap echo -n $"Loading keymap: " . /etc/sysconfig/keyboard if [ "${KEYTABLE:-bogus}" != "bogus" ]; then # Specify VT0 in case we use a serial console # Unicode keyboard support case "$LANG" in *.utf8*|*.UTF-8*) loadkeys -u $KEYTABLE < /dev/tty0 > /dev/null 2>&1 ;; *) loadkeys $KEYTABLE < /dev/tty0 > /dev/null 2>&1 ;; esac # RETVAL=$? [ $RETVAL -eq 0 ] && echo_success [ $RETVAL -ne 0 ] && echo_failure echo fi if [ -x /sbin/setsysfont ]; then echo -n $"Loading system font: " /sbin/setsysfont RES=$? [ $RES -eq 0 ] && echo_success [ $RES -ne 0 ] && echo_failure echo fi [ $RETVAL -eq 0 ] && touch /var/lock/subsys/keytable } stop() { rm -f /var/lock/subsys/keytable } restart() { $0 start RETVAL=$? } status() { echo $"No status available for this package" exit 0 } case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; status) status ;; *) echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}" exit 1 esac exit $RETVAL