#!/bin/sh set -e # Source debconf library. . /usr/share/debconf/confmodule p=console-cyrillic if [ "$1" = "configure" ]; then update-rc.d console-cyrillic start 61 S . >/dev/null db_get console-cyrillic/ttys ttys="$RET"; db_get console-cyrillic/fontstyle case "$RET" in UniCyr) style=uni;; DOS) style=dos;; Alt) style=alt;; Pln) style=ibm;; # For compatability with old version IBM) style=ibm;; Cage) style=cage;; Thin) style=thin;; Sarge) style=sarge;; Antiq) style=antiq;; Sans) style=sans;; Lenta) style=lenta;; A) style=a;; B) style=b;; C) style=c;; ISO) style=iso;; Arab) style=arab;; Terminus\ Unicode\ Normal) style=ter-uni-norm;; Terminus\ Unicode\ Bold) style=ter-uni-bold;; Terminus\ Unicode\ Framebuffer) style=ter-uni-framebuf;; Terminus\ Asian\ Normal) style=ter-asia-norm;; Terminus\ Asian\ Bold) style=ter-asia-bold;; Terminus\ Asian\ Framebuffer) style=ter-asia-framebuf;; Terminus\ Slavic\ Normal) style=ter-slav-norm;; Terminus\ Slavic\ Bold) style=ter-slav-bold;; Terminus\ Slavic\ Framebuffer) style=ter-slav-framebuf;; A\ Asian) style=a-asia;; B\ Asian) style=b-asia;; Antiq\ Asian) style=antiq-asia;; *) echo "Unknown style $RET" exit 2;; esac db_get console-cyrillic/fontsize size=$RET if [ "$size" = 8 ] && [ "$style" = ibm ]; then style=pln fi db_get console-cyrillic/kbdtype case "$RET" in Belarusian) layout=by;; Bulgarian\ BDS) layout=bg_bds;; Bulgarian\ phonetic) layout=bg_phon;; Kazakh) layout=kaz_gost;; Kazakh\ with\ letter\ IO) layout=kaz_alt;; Macedonian) layout=mk;; Mongolian) layout=mn;; Russian) layout=ru;; Russian\ Winkeys) layout=ru_ms;; Ukrainian) layout=ua;; Ukrainian\ Winkeys) layout=ua_ms;; Serbian) layout=sr;; # For compatability with old version Yugoslavian) layout=sr;; *) echo "Unknown keyboard $RET" exit 2;; esac db_get console-cyrillic/toggle case "$RET" in Caps\ Lock) toggle=caps_toggle;; Right\ Alt) toggle=toggle;; Right\ Control) toggle=right_ctrl_toggle;; Right\ Shift) toggle=shift_toggle;; Alt+Shift) toggle=alt_shift_toggle;; Control+Shift) toggle=ctrl_shift_toggle;; Control+Alt) toggle=ctrl_alt_toggle;; Left\ Windows\ logo\ key) toggle=lwin_toggle;; Right\ Windows\ logo\ key) toggle=rwin_toggle;; Menu\ key) toggle=menu_toggle;; *) echo "Unknown keyboard toggle $RET" exit 2;; esac db_get console-cyrillic/switch case "$RET" in Right\ Alt) switch=switch;; Menu\ key) switch=menu_switch;; Left\ Windows\ logo\ key) switch=lwin_switch;; Right\ Windows\ logo\ key) switch=rwin_switch;; Both\ Windows\ logo\ keys) switch=win_switch;; No\ temporary\ switch) switch="";; *) echo "Unknown keyboard switch $RET" exit 2;; esac db_get console-cyrillic/encoding case "$RET" in UNICODE) encoding=utf-8;; CP866) encoding=cp866;; CP1251) encoding=cp1251;; ISO-8859-5) encoding=iso-8859-5;; KOI8-R) encoding=koi8-r;; KOI8-U) encoding=koi8-u;; MAC-CYRILLIC) encoding=mac-cyrillic;; MIK) encoding=mik;; PT154) encoding=pt154;; *) echo "Unknown keyboard encoding $RET" exit 2;; esac db_get console-cyrillic/bootsetup case "$RET" in true) bootsetup=YES;; false) bootsetup=NO;; esac db_get console-cyrillic/change_config if [ "$RET" = "true" ]; then DEBCONF_FILE=/etc/console-cyrillic else DEBCONF_FILE=/etc/console-cyrillic.debconf fi cat >$DEBCONF_FILE <