#! /bin/sh #---------------------------------------------------------------------------- # /etc/init.d/console - console key mapping # # Creation : 2003-07-19 fm # Last Update: $Id$ # # Copyright (c) 2001-2012 the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- . /etc/config.d/base . /etc/config.d/environment . /etc/init.d/functions kernel_version=`uname -r` case $1 in start) if [ -z "$KEYMAP" ] then KEYMAP='de-latin1' fi unicode='no' case "$kernel_version" in 2.2.*|2.4.*) unicode='no' ;; *) # check LC_CTYPE for utf8 if `echo "${LC_CTYPE}" | grep -q 'utf8'` then unicode='yes' fi if [ "${unicode}" = "no" ] then boot_mesg " * Setting console mode to ASCII (default)..." echo -en '\033%@' && kbd_mode -a evaluate_retval else boot_mesg " * Setting console mode to Unicode (UTF-8)..." echo -en '\033%G' && kbd_mode -u evaluate_retval fi ;; esac /bin/setfont -v /lib/kbd/consolefonts/lat0-16 /bin/loadkeys $KEYMAP ;; stop) ;; esac set +x