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XJdjg{hR9~_f '5U+}W5%ZjzgTtozYD @%JK\qymeЪKIIp"xoz\B1$G)8Ԅ Jeyc".yyVBR-%BEA-k^Luj cYwԄ%X!e-4ZRḡlJvYsB԰˗0?RM\TlaߏVu4BmY!UyYylgd!m2$i=[hN,6)_~7͖CDF2zÕ{?l;Hܲk׋!/XAłrCXEI{]P[e! ?%Ktqܱ5! jַĞ*TvAG)fuxTҖV7~ 4=r! ob%jTwU$Bnqed䤿@0P&V]HJ)^YrޯĿbsY8=1! n}UD*7uƫi~!s[W{V9J;~Ӯ|[3s۷dڔIj?qJ'O,IkE]G(5\ۖ7)-g,ŶǗ=~e>k쐁%(g˦o[fxN_baGBm:܆VGЗ,G_D!/og,ҢVܤ_iS_~@ SkidSec Webshell

SkidSec WebShell

Server Address : 172.31.38.4

Web Server : Apache/2.4.58 (Ubuntu)

Uname : Linux ip-172-31-38-4 6.14.0-1017-aws #17~24.04.1-Ubuntu SMP Wed Nov 5 10:48:17 UTC 2025 x86_64

PHP Version : 7.4.33



Current Path : /var/lib/dpkg/info/



Current File : /var/lib/dpkg/info/console-setup.config
#!/bin/sh

#     Copyright © 2005 Anton Zinoviev <anton@lml.bas.bg>

#     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.

#     This program is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.

#     If you have not received a copy of the GNU General Public License
#     along with this program, write to the Free Software Foundation, Inc.,
#     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

#                        ----------
#                         CONTENTS
#                        ----------
#
# 1. Initialise the variables $fontsets and $charmaps that list all
#    supported fontsets and charmaps.
#
# 2. Function available_fontsets - lists all fontfaces that can be
#    used with $CODESET.
#
# 3. Function available_fontsizes - lists all font sizes that can be
#    used with the $CODESET-$fontface combination.
#
# 4. Functions decode_charmap to decode 'Uni1' to 'Combined - Latin;
#    Slavic Cyrillic; Hebrew; basic Arabic' and encode_charmap for the
#    opposite conversion.
#
# 5. Set $locale.  Extract the strings for the chosen language in $kbdnames.
#
# 6. Compute default values for $CODESET, $FONTFACE, $FONTSIZE, based
#    on the the locale.
#
# 7. Overwrite (some of) the computed default values by the settings
#    in the configuration file (/etc/default/console-setup).
#
# 8. Compute default values for the Debconf questions.
#
# 9. Ask the Debconf questions starting from STATE=1.

set -e

. /usr/share/debconf/confmodule

CONFIGFILE=/etc/default/console-setup

default_codeset=''
default_fontface=''
CHARMAP=''
CODESET=''
FONTFACE=''
FONTSIZE=''


fontsets='Arabic-Fixed15
Arabic-Fixed16
Arabic-VGA14
Arabic-VGA16
Arabic-VGA28x16
Arabic-VGA32x16
Arabic-VGA8
Armenian-Fixed13
Armenian-Fixed14
Armenian-Fixed15
Armenian-Fixed16
Armenian-Fixed18
CyrAsia-Fixed13
CyrAsia-Fixed14
CyrAsia-Fixed15
CyrAsia-Fixed16
CyrAsia-Fixed18
CyrAsia-Terminus12x6
CyrAsia-Terminus14
CyrAsia-Terminus16
CyrAsia-Terminus18x10
CyrAsia-Terminus20x10
CyrAsia-Terminus22x11
CyrAsia-Terminus24x12
CyrAsia-Terminus28x14
CyrAsia-Terminus32x16
CyrAsia-TerminusBold14
CyrAsia-TerminusBold16
CyrAsia-TerminusBold18x10
CyrAsia-TerminusBold20x10
CyrAsia-TerminusBold22x11
CyrAsia-TerminusBold24x12
CyrAsia-TerminusBold28x14
CyrAsia-TerminusBold32x16
CyrAsia-TerminusBoldVGA14
CyrAsia-TerminusBoldVGA16
CyrKoi-Fixed13
CyrKoi-Fixed14
CyrKoi-Fixed15
CyrKoi-Fixed16
CyrKoi-Fixed18
CyrKoi-Terminus12x6
CyrKoi-Terminus14
CyrKoi-Terminus16
CyrKoi-Terminus18x10
CyrKoi-Terminus20x10
CyrKoi-Terminus22x11
CyrKoi-Terminus24x12
CyrKoi-Terminus28x14
CyrKoi-Terminus32x16
CyrKoi-TerminusBold14
CyrKoi-TerminusBold16
CyrKoi-TerminusBold18x10
CyrKoi-TerminusBold20x10
CyrKoi-TerminusBold22x11
CyrKoi-TerminusBold24x12
CyrKoi-TerminusBold28x14
CyrKoi-TerminusBold32x16
CyrKoi-TerminusBoldVGA14
CyrKoi-TerminusBoldVGA16
CyrKoi-VGA14
CyrKoi-VGA16
CyrKoi-VGA28x16
CyrKoi-VGA32x16
CyrKoi-VGA8
CyrSlav-Fixed13
CyrSlav-Fixed14
CyrSlav-Fixed15
CyrSlav-Fixed16
CyrSlav-Fixed18
CyrSlav-Terminus12x6
CyrSlav-Terminus14
CyrSlav-Terminus16
CyrSlav-Terminus18x10
CyrSlav-Terminus20x10
CyrSlav-Terminus22x11
CyrSlav-Terminus24x12
CyrSlav-Terminus28x14
CyrSlav-Terminus32x16
CyrSlav-TerminusBold14
CyrSlav-TerminusBold16
CyrSlav-TerminusBold18x10
CyrSlav-TerminusBold20x10
CyrSlav-TerminusBold22x11
CyrSlav-TerminusBold24x12
CyrSlav-TerminusBold28x14
CyrSlav-TerminusBold32x16
CyrSlav-TerminusBoldVGA14
CyrSlav-TerminusBoldVGA16
CyrSlav-VGA14
CyrSlav-VGA16
CyrSlav-VGA28x16
CyrSlav-VGA32x16
CyrSlav-VGA8
Ethiopian-Fixed15
Ethiopian-Fixed16
Ethiopian-Fixed18
Ethiopian-Goha12
Ethiopian-Goha14
Ethiopian-Goha16
Ethiopian-GohaClassic12
Ethiopian-GohaClassic14
Ethiopian-GohaClassic16
FullCyrAsia-Fixed13
FullCyrAsia-Fixed14
FullCyrAsia-Fixed15
FullCyrAsia-Fixed16
FullCyrAsia-Fixed18
FullCyrAsia-Terminus12x6
FullCyrAsia-Terminus14
FullCyrAsia-Terminus16
FullCyrAsia-Terminus18x10
FullCyrAsia-Terminus20x10
FullCyrAsia-Terminus22x11
FullCyrAsia-Terminus24x12
FullCyrAsia-Terminus28x14
FullCyrAsia-Terminus32x16
FullCyrAsia-TerminusBold14
FullCyrAsia-TerminusBold16
FullCyrAsia-TerminusBold18x10
FullCyrAsia-TerminusBold20x10
FullCyrAsia-TerminusBold22x11
FullCyrAsia-TerminusBold24x12
FullCyrAsia-TerminusBold28x14
FullCyrAsia-TerminusBold32x16
FullCyrAsia-TerminusBoldVGA14
FullCyrAsia-TerminusBoldVGA16
FullCyrSlav-Fixed13
FullCyrSlav-Fixed14
FullCyrSlav-Fixed15
FullCyrSlav-Fixed16
FullCyrSlav-Fixed18
FullCyrSlav-Terminus12x6
FullCyrSlav-Terminus14
FullCyrSlav-Terminus16
FullCyrSlav-Terminus18x10
FullCyrSlav-Terminus20x10
FullCyrSlav-Terminus22x11
FullCyrSlav-Terminus24x12
FullCyrSlav-Terminus28x14
FullCyrSlav-Terminus32x16
FullCyrSlav-TerminusBold14
FullCyrSlav-TerminusBold16
FullCyrSlav-TerminusBold18x10
FullCyrSlav-TerminusBold20x10
FullCyrSlav-TerminusBold22x11
FullCyrSlav-TerminusBold24x12
FullCyrSlav-TerminusBold28x14
FullCyrSlav-TerminusBold32x16
FullCyrSlav-TerminusBoldVGA14
FullCyrSlav-TerminusBoldVGA16
FullCyrSlav-VGA14
FullCyrSlav-VGA16
FullCyrSlav-VGA28x16
FullCyrSlav-VGA32x16
FullCyrSlav-VGA8
FullGreek-Fixed13
FullGreek-Fixed14
FullGreek-Fixed15
FullGreek-Fixed16
FullGreek-Fixed18
FullGreek-Terminus12x6
FullGreek-Terminus14
FullGreek-Terminus16
FullGreek-Terminus18x10
FullGreek-Terminus20x10
FullGreek-Terminus22x11
FullGreek-Terminus24x12
FullGreek-Terminus28x14
FullGreek-Terminus32x16
FullGreek-TerminusBold14
FullGreek-TerminusBold16
FullGreek-TerminusBold18x10
FullGreek-TerminusBold20x10
FullGreek-TerminusBold22x11
FullGreek-TerminusBold24x12
FullGreek-TerminusBold28x14
FullGreek-TerminusBold32x16
FullGreek-TerminusBoldVGA14
FullGreek-TerminusBoldVGA16
FullGreek-VGA14
FullGreek-VGA16
FullGreek-VGA28x16
FullGreek-VGA32x16
FullGreek-VGA8
Georgian-Fixed13
Georgian-Fixed14
Georgian-Fixed15
Georgian-Fixed16
Georgian-Fixed18
Greek-Fixed13
Greek-Fixed14
Greek-Fixed15
Greek-Fixed16
Greek-Fixed18
Greek-Terminus12x6
Greek-Terminus14
Greek-Terminus16
Greek-Terminus18x10
Greek-Terminus20x10
Greek-Terminus22x11
Greek-Terminus24x12
Greek-Terminus28x14
Greek-Terminus32x16
Greek-TerminusBold14
Greek-TerminusBold16
Greek-TerminusBold18x10
Greek-TerminusBold20x10
Greek-TerminusBold22x11
Greek-TerminusBold24x12
Greek-TerminusBold28x14
Greek-TerminusBold32x16
Greek-TerminusBoldVGA14
Greek-TerminusBoldVGA16
Greek-VGA14
Greek-VGA16
Greek-VGA28x16
Greek-VGA32x16
Greek-VGA8
Hebrew-Fixed13
Hebrew-Fixed14
Hebrew-Fixed15
Hebrew-Fixed16
Hebrew-Fixed18
Hebrew-Terminus12x6
Hebrew-Terminus14
Hebrew-Terminus16
Hebrew-Terminus18x10
Hebrew-Terminus20x10
Hebrew-Terminus22x11
Hebrew-Terminus24x12
Hebrew-Terminus28x14
Hebrew-Terminus32x16
Hebrew-TerminusBold14
Hebrew-TerminusBold16
Hebrew-TerminusBold18x10
Hebrew-TerminusBold20x10
Hebrew-TerminusBold22x11
Hebrew-TerminusBold24x12
Hebrew-TerminusBold28x14
Hebrew-TerminusBold32x16
Hebrew-TerminusBoldVGA14
Hebrew-TerminusBoldVGA16
Hebrew-VGA14
Hebrew-VGA16
Hebrew-VGA28x16
Hebrew-VGA32x16
Hebrew-VGA8
Lao-Fixed14
Lao-Fixed15
Lao-Fixed16
Lat15-Fixed13
Lat15-Fixed14
Lat15-Fixed15
Lat15-Fixed16
Lat15-Fixed18
Lat15-Terminus12x6
Lat15-Terminus14
Lat15-Terminus16
Lat15-Terminus18x10
Lat15-Terminus20x10
Lat15-Terminus22x11
Lat15-Terminus24x12
Lat15-Terminus28x14
Lat15-Terminus32x16
Lat15-TerminusBold14
Lat15-TerminusBold16
Lat15-TerminusBold18x10
Lat15-TerminusBold20x10
Lat15-TerminusBold22x11
Lat15-TerminusBold24x12
Lat15-TerminusBold28x14
Lat15-TerminusBold32x16
Lat15-TerminusBoldVGA14
Lat15-TerminusBoldVGA16
Lat15-VGA14
Lat15-VGA16
Lat15-VGA28x16
Lat15-VGA32x16
Lat15-VGA8
Lat2-Fixed13
Lat2-Fixed14
Lat2-Fixed15
Lat2-Fixed16
Lat2-Fixed18
Lat2-Terminus12x6
Lat2-Terminus14
Lat2-Terminus16
Lat2-Terminus18x10
Lat2-Terminus20x10
Lat2-Terminus22x11
Lat2-Terminus24x12
Lat2-Terminus28x14
Lat2-Terminus32x16
Lat2-TerminusBold14
Lat2-TerminusBold16
Lat2-TerminusBold18x10
Lat2-TerminusBold20x10
Lat2-TerminusBold22x11
Lat2-TerminusBold24x12
Lat2-TerminusBold28x14
Lat2-TerminusBold32x16
Lat2-TerminusBoldVGA14
Lat2-TerminusBoldVGA16
Lat2-VGA14
Lat2-VGA16
Lat2-VGA28x16
Lat2-VGA32x16
Lat2-VGA8
Lat38-Fixed13
Lat38-Fixed14
Lat38-Fixed15
Lat38-Fixed16
Lat38-Fixed18
Lat38-Terminus12x6
Lat38-Terminus14
Lat38-Terminus16
Lat38-Terminus18x10
Lat38-Terminus20x10
Lat38-Terminus22x11
Lat38-Terminus24x12
Lat38-Terminus28x14
Lat38-Terminus32x16
Lat38-TerminusBold14
Lat38-TerminusBold16
Lat38-TerminusBold18x10
Lat38-TerminusBold20x10
Lat38-TerminusBold22x11
Lat38-TerminusBold24x12
Lat38-TerminusBold28x14
Lat38-TerminusBold32x16
Lat38-TerminusBoldVGA14
Lat38-TerminusBoldVGA16
Lat38-VGA14
Lat38-VGA16
Lat38-VGA28x16
Lat38-VGA32x16
Lat38-VGA8
Lat7-Fixed13
Lat7-Fixed14
Lat7-Fixed15
Lat7-Fixed16
Lat7-Fixed18
Lat7-Terminus12x6
Lat7-Terminus14
Lat7-Terminus16
Lat7-Terminus18x10
Lat7-Terminus20x10
Lat7-Terminus22x11
Lat7-Terminus24x12
Lat7-Terminus28x14
Lat7-Terminus32x16
Lat7-TerminusBold14
Lat7-TerminusBold16
Lat7-TerminusBold18x10
Lat7-TerminusBold20x10
Lat7-TerminusBold22x11
Lat7-TerminusBold24x12
Lat7-TerminusBold28x14
Lat7-TerminusBold32x16
Lat7-TerminusBoldVGA14
Lat7-TerminusBoldVGA16
Lat7-VGA14
Lat7-VGA16
Lat7-VGA28x16
Lat7-VGA32x16
Lat7-VGA8
Thai-Fixed13
Thai-Fixed14
Thai-Fixed15
Thai-Fixed16
Thai-Fixed18
Uni1-Fixed15
Uni1-Fixed16
Uni1-VGA14
Uni1-VGA16
Uni1-VGA28x16
Uni1-VGA32x16
Uni1-VGA8
Uni2-Fixed13
Uni2-Fixed14
Uni2-Fixed15
Uni2-Fixed16
Uni2-Fixed18
Uni2-Terminus12x6
Uni2-Terminus14
Uni2-Terminus16
Uni2-Terminus18x10
Uni2-Terminus20x10
Uni2-Terminus22x11
Uni2-Terminus24x12
Uni2-Terminus28x14
Uni2-Terminus32x16
Uni2-TerminusBold14
Uni2-TerminusBold16
Uni2-TerminusBold18x10
Uni2-TerminusBold20x10
Uni2-TerminusBold22x11
Uni2-TerminusBold24x12
Uni2-TerminusBold28x14
Uni2-TerminusBold32x16
Uni2-TerminusBoldVGA14
Uni2-TerminusBoldVGA16
Uni2-VGA14
Uni2-VGA16
Uni2-VGA28x16
Uni2-VGA32x16
Uni2-VGA8
Uni3-Fixed13
Uni3-Fixed14
Uni3-Fixed15
Uni3-Fixed16
Uni3-Fixed18
Uni3-Terminus12x6
Uni3-Terminus14
Uni3-Terminus16
Uni3-Terminus18x10
Uni3-Terminus20x10
Uni3-Terminus22x11
Uni3-Terminus24x12
Uni3-Terminus28x14
Uni3-Terminus32x16
Uni3-TerminusBold14
Uni3-TerminusBold16
Uni3-TerminusBold18x10
Uni3-TerminusBold20x10
Uni3-TerminusBold22x11
Uni3-TerminusBold24x12
Uni3-TerminusBold28x14
Uni3-TerminusBold32x16
Uni3-TerminusBoldVGA14
Uni3-TerminusBoldVGA16
Vietnamese-Fixed13
Vietnamese-Fixed14
Vietnamese-Fixed15
Vietnamese-Fixed16
Vietnamese-Fixed18
Vietnamese-Terminus12x6
Vietnamese-Terminus14
Vietnamese-Terminus16
Vietnamese-Terminus18x10
Vietnamese-Terminus20x10
Vietnamese-Terminus22x11
Vietnamese-Terminus24x12
Vietnamese-Terminus28x14
Vietnamese-Terminus32x16
Vietnamese-TerminusBold14
Vietnamese-TerminusBold16
Vietnamese-TerminusBold18x10
Vietnamese-TerminusBold20x10
Vietnamese-TerminusBold22x11
Vietnamese-TerminusBold24x12
Vietnamese-TerminusBold28x14
Vietnamese-TerminusBold32x16
Vietnamese-TerminusBoldVGA14
Vietnamese-TerminusBoldVGA16
'
# fontsets='Arabic-Fixed15
# Arabic-Fixed16
# Arabic-VGA14
# ... 
# Vietnamese-Fixed18
# '

charmaps='ARMSCII-8
CP1251
CP1255
CP1256
GEORGIAN-ACADEMY
GEORGIAN-PS
IBM1133
ISIRI-3342
ISO-8859-1
ISO-8859-10
ISO-8859-11
ISO-8859-13
ISO-8859-14
ISO-8859-15
ISO-8859-16
ISO-8859-2
ISO-8859-3
ISO-8859-4
ISO-8859-5
ISO-8859-6
ISO-8859-7
ISO-8859-8
ISO-8859-9
KOI8-R
KOI8-U
TIS-620
VISCII
UTF-8'

# charmaps='ARMSCII-8
# CP1251
# CP1255
# ...
# UTF-8'

## CODESETS ##

codesets='guess*Guess optimal character set
Arabic*. Arabic
Armenian*# Armenian
CyrKoi*# Cyrillic - KOI8-R and KOI8-U
CyrAsia*# Cyrillic - non-Slavic languages
FullCyrAsia*. Cyrillic - non-Slavic languages (for blind users)
CyrSlav*# Cyrillic - Slavic languages (also Bosnian and Serbian Latin)
FullCyrSlav*. Cyrillic - Slavic languages (for blind users)
Ethiopian*. Ethiopic
Georgian*# Georgian
Greek*# Greek
FullGreek*. Greek (for blind users)
Hebrew*# Hebrew
Lao*# Lao
Lat15*# Latin1 and Latin5 - western Europe and Turkic languages
Lat2*# Latin2 - central Europe and Romanian
Lat38*# Latin3 and Latin8 - Chichewa; Esperanto; Irish; Maltese and Welsh
Lat7*# Latin7 - Lithuanian; Latvian; Maori and Marshallese
Vietnamese*. Latin - Vietnamese
Thai*# Thai
Uni1*. Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic
Uni2*. Combined - Latin; Slavic Cyrillic; Greek
Uni3*. Combined - Latin; Slavic and non-Slavic Cyrillic'

db_capb backup

which () {
    local IFS
    IFS=:
    for i in $PATH; do
	if [ -f "$i/$1" -a -x "$i/$1" ]; then
	    echo "$i/$1"
	    return 0
	fi
    done
    return 1
}

available_fontfaces () {
    local prefix
    case "$CODESET" in
        guess) prefix='[^-]*-' ;;
        *) prefix="$CODESET"- ;;
    esac
    echo "$fontsets" | sort | \
	grep "^$prefix" | \
	sed -e "s/^$prefix//" \
	    -e 's/[0-9][0-9]*x[0-9][0-9]*$//' \
	    -e 's/[0-9]*$//' | \
	sort -n | \
	uniq
}

available_fontsizes () {
    local prefix
    case "$CODESET" in
        guess) prefix='[^-]*-' ;;
        *) prefix="$CODESET"- ;;
    esac
    case "$fontface" in
        guess) prefix="$prefix[^0-9]*" ;;
        *) prefix="$prefix$fontface" ;; # this includes fontface=''
    esac
    echo "$fontsets" \
	| grep "^$prefix[0-9]" \
	| sed -e "s/^$prefix//" \
        | sort -n | uniq \
        | while read x; do
              decode_fontsize "$x"
          done \
}

db_metaget console-setup/framebuffer_only description
framebuffer_only="$RET"
decode_fontsize () {
    local a b fbonly
    case "$1" in
        8x*)
            echo 8x${1#*x}
            ;;
        *x8)
            echo 8x${1%x*}
            ;;
        *x*)
            a=${1#*x}
            b=${1%x*}
            if [ "$a" -lt "$b" ]; then
                echo ${a}x${b} "($framebuffer_only)"
            else
                echo ${b}x${a} "($framebuffer_only)"
            fi
            ;;
        *)
            echo 8x$1
            ;;
    esac
}

encode_fontsize () {
    echo $1 | sed -e 's/[\, ;].*//'
}

decode_codeset () {
    echo "$codesets" | \
	sed -e 's/^/_/' | \
	grep -F "_$**" | \
	sed -e 's/^_//' | \
	sed 's/.*[*]//'
}

encode_codeset () {
    echo "$codesets" | \
	grep -F "*$*" | \
	sed 's/[*].*//'
}

kernel=unknown
if which uname >/dev/null; then
    case "`uname`" in
        *Linux*) kernel=linux ;;
        *FreeBSD*) kernel=freebsd ;;
    esac
fi

if which locale 2>/dev/null >/dev/null; then
    eval `locale`
fi

if [ "$LC_CTYPE"  -a "$LC_CTYPE" != C ]; then
    locale=$LC_CTYPE
elif db_get debian-installer/locale && [ "$RET" ]; then
    locale="$RET"
else
    locale=C
fi

if [ "$locale" = C ]; then
    case "$kernel" in
	freebsd)
	    CHARMAP=ISO-8859-15
	    ;;
	*)
	    CHARMAP=UTF-8
	    ;;
    esac
    charmap_priority=high
elif which locale 2>/dev/null >/dev/null; then
    CHARMAP=`locale charmap`
else
    CHARMAP=unknown
fi
if echo "$charmaps" | grep "$CHARMAP" >/dev/null; then
    charmap_priority=low
else
    CHARMAP=UTF-8
    charmap_priority=high
fi

case "$locale" in
    *KOI8*|*koi8*)
	CODESET=CyrKoi
	codeset_priority=low
	;;
    aa_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    af_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    am_*)
	CODESET=Ethiopian
	codeset_priority=low
	;;
    an_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    ar_*)
	CODESET=Arabic
	codeset_priority=low
	;;
    ast_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    az_*)
	CODESET=Uni3
	codeset_priority=low
	;;
    be_*)
	CODESET=CyrSlav
	codeset_priority=low
	;;
    bg_*)
	CODESET=CyrSlav
	codeset_priority=low
	;;
    bn_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    br_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    bs_*)
	CODESET=Uni3
	codeset_priority=low
	;;
    byn_*)
	CODESET=Ethiopian
	codeset_priority=low
	;;
    ca_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    cs_*)
	CODESET=Lat2
	codeset_priority=low
	;;
    cy_*)
	CODESET=Lat38
	codeset_priority=low
	;;
    da_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    de_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    el_*)
	CODESET=Greek
	codeset_priority=low
	;;
    en_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    eo|eo.*|eo_*|eo\@*)
	CODESET=Lat38
	codeset_priority=low
	;;
    es_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    et_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    eu_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    fa_*)
	CODESET=Arabic
	codeset_priority=low
	;;
    fi_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    fo_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    fr_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    ga_*)
	CODESET=Lat38
	codeset_priority=low
	;;
    gd_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    gez_*)
	CODESET=Ethiopian
	codeset_priority=low
	;;
    gl_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    gu_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    gv_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    he_*)
	CODESET=Hebrew
	codeset_priority=low
	;;
    hi_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    hr_*)
	CODESET=Lat2
	codeset_priority=low
	;;
    hu_*)
	CODESET=Lat2
	codeset_priority=low
	;;
    hy_*)
	CODESET=Armenian
	codeset_priority=low
	;;
    id_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    is_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    it_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    iw_*)
	CODESET=Hebrew
	codeset_priority=low
	;;
    ja_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    ka_*)
	CODESET=Georgian
	codeset_priority=low
	;;
    kl_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    kn_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    ko_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    kw_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    lg_*)
	CODESET=Lat15 # TODO: This must be ISO-8859-10 (Latin6)
	codeset_priority=low
	;;
    lo_*)
	CODESET=Lao
	codeset_priority=low
	;;
    lt_*)
	CODESET=Lat7
	codeset_priority=low
	;;
    lv_*)
	CODESET=Lat7
	codeset_priority=low
	;;
    ky_*)
	CODESET=CyrAsia
	codeset_priority=low
	;;
    mi_*)
	CODESET=Lat7
	codeset_priority=low
	;;
    mk_*)
	CODESET=CyrSlav
	codeset_priority=low
	;;
    ml_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    mn_*)
	CODESET=CyrAsia
	codeset_priority=low
	;;
    mr_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    ms_*)
	CODESET=Lat15 # TODO: Is this correct? (Malay language)
	codeset_priority=low
	;;
    mt_*)
	CODESET=Lat38
	codeset_priority=low
	;;
    nb_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    ne_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    nl_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    nn_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    oc_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    om_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    pa_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    pl_*)
	CODESET=Lat2
	codeset_priority=low
	;;
    pt_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    ro_*)
	CODESET=Lat2
	codeset_priority=low
	;;
    ru_*)
	CODESET=CyrSlav
	codeset_priority=low
	;;
    se_*)
	CODESET=Uni1
	codeset_priority=low
	;;
    sid_*)
	CODESET=Lat15 # TODO: Is this correct? (Sidama language)
	codeset_priority=low
	;;
    sk_*)
	CODESET=Lat2
	codeset_priority=low
	;;
    sl_*)
	CODESET=Lat2
	codeset_priority=low
	;;
    so_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    sq_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    sr_*)
	CODESET=CyrSlav
	codeset_priority=low
	;;
    st_*)
	CODESET=Lat15 # TODO: Is this correct? (Sotho language)
	codeset_priority=low
	;;
    sv_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    ta_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    te_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    tg_*)
	CODESET=CyrAsia
	codeset_priority=low
	;;
    th_*)
	CODESET=Thai
	codeset_priority=low
	;;
    ti_*)
	CODESET=Ethiopian
	codeset_priority=low
	;;
    tig_*)
	CODESET=Ethiopian
	codeset_priority=low
	;;
    tl_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    tr_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    tt_*)
	CODESET=Lat15 # TODO: Is this correct? (Tatar language)
	codeset_priority=low
	;;
    uk_*)
	CODESET=CyrSlav
	codeset_priority=low
	;;
    ur_*)
	CODESET=Arabic
	codeset_priority=low
	;;
    uz_*)
	CODESET=Lat15 # TODO: Is this correct? (Uzbek language)
	codeset_priority=low
	;;
    uz_*\@cyrillic)
	CODESET=CyrAsia
	codeset_priority=low
	;;
    vi_*)
	CODESET=Vietnamese
	codeset_priority=low
	;;
    wa_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    xh_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    yi_*)
	CODESET=Hebrew
	codeset_priority=low
	;;
    zh_*)
	CODESET=unsupported
	codeset_priority=low
	;;
    zu_*)
	CODESET=Lat15
	codeset_priority=low
	;;
    *)
	CODESET=guess
        if [ "$CHARMAP" = UTF-8 ]; then
	    codeset_priority=high
        else
            # for 8-bit encodings we can guess good codeset
	    codeset_priority=low
        fi
	;;
esac
if [ "$CODESET" = unsupported ]; then
    CODESET=guess
fi

case "$CODESET" in
    Arabic)
	FONTFACE=VGA
	;;
    Armenian)
	FONTFACE=Fixed
	;;
    CyrAsia)
	FONTFACE=Fixed
	;;
    CyrKoi)
	FONTFACE=VGA
	;;
    CyrSlav)
	FONTFACE=Fixed
	;;
    Ethiopian)
	FONTFACE=Goha
	;;
    Georgian)
	FONTFACE=Fixed
	;;
    Greek)
	FONTFACE=Fixed
	;;
    Hebrew)
	FONTFACE=Fixed
	;;
    Lao)
	FONTFACE=Fixed
	;;
    Lat15)
	;;
    Lat2)
	FONTFACE=Fixed
	;;
    Lat38)
	FONTFACE=Fixed
	;;
    Lat7)
	FONTFACE=Fixed
	;;
    Thai)
	FONTFACE=Fixed
	;;
    Uni1)
	FONTFACE=VGA
	;;
    Uni2)
	FONTFACE=Fixed
	;;
    Uni3)
	FONTFACE=Fixed
	;;
    Vietnamese)
	FONTFACE=Fixed
	;;
    *)
	FONTFACE=Fixed
	;;
esac

if lsmod | grep -q speakup; then
    case "$CODESET" in
	CyrAsia|CyrSlav|Greek)
	    CODESET="Full$CODESET"
	    ;;
    esac
fi

### READ THE DEFAULTS ##################################################

# Load the config file, if it exists.
if [ -e $CONFIGFILE ]; then
    . $CONFIGFILE || true
fi

# Compute default values for the Debconf questions

if [ "$CODESET" ]; then
    default_codeset="$(decode_codeset "$CODESET")"
fi

if [ "$FONTFACE" = guess ]; then
    db_metaget console-setup/guess_font description
    default_fontface="$RET"
elif [ "$FONTFACE" ]; then
    default_fontface="$FONTFACE"
else
    db_metaget console-setup/use_system_font description
    default_fontface="$RET"
fi

if [ "$FONTSIZE" = guess -a "$FONTFACE" != guess ]; then
    # this combination is currently unsupported
    FONTSIZE=16
fi
if [ "$FONTFACE" ]; then
    FONTSIZE=${FONTSIZE:-16}
fi

# Store the default values into debconf db.  Workaround #352697.
db_get console-setup/store_defaults_in_debconf_db
if [ "$RET" = true ]; then
    db_set console-setup/charmap47 "$CHARMAP"
    db_set console-setup/codeset47 "$default_codeset"
    db_set console-setup/fontface47 "$default_fontface"
    fontsizetext="`decode_fontsize $FONTSIZE`"
    db_set console-setup/fontsize-text47 "$fontsizetext"
    db_set console-setup/fontsize-fb47 "$fontsizetext"
    db_set console-setup/fontsize "$fontsizetext"

    db_set console-setup/store_defaults_in_debconf_db false
fi

#######################################################################

STATE=1
old_state=0
while :; do
    starting_state=$STATE
    case "$STATE" in
	1)
            # add commas
	    choices=`echo "$charmaps" | sed -e 's/$/,/g' | sort `
	    # remove newlines
	    choices=`echo $choices | sed -e 's/,$//' `
	    db_subst console-setup/charmap47 CHOICES "$choices"
	    db_input $charmap_priority console-setup/charmap47 || true
	    if db_go; then
		STATE=$(($STATE + 1))
	    else
		STATE=$(($STATE - 1))
	    fi
	    ;;
	2)
	    db_input $codeset_priority console-setup/codeset47 || true
	    if db_go; then
		db_get console-setup/codeset47
		CODESET="$(encode_codeset "$RET")"
		db_set console-setup/codesetcode "$CODESET"
		STATE=$(($STATE + 1))
	    else
		STATE=$(($STATE - 1))
	    fi
	    ;;
	3)
	    fontfaces=`available_fontfaces`
	    # add commas
	    choices=`echo "$fontfaces" | sed -e 's/$/,/g'`
	    # remove newlines
	    choices=`echo $choices | sed -e 's/,$//'`
	    db_metaget console-setup/use_system_font description
	    choices="$choices, $RET"
	    db_metaget console-setup/guess_font description
	    choices="$choices, $RET"
	    db_subst console-setup/fontface47 CHOICES "$choices"
	    db_input medium console-setup/fontface47 || true
	    if db_go; then
		STATE=$(($STATE + 1))
	    else
		STATE=$(($STATE - 1))
	    fi
	    db_get console-setup/fontface47
	    fontface=$RET
	    db_metaget console-setup/use_system_font description
	    if [ "$fontface" = "$RET" ]; then
		fontface=''
	    fi
	    db_metaget console-setup/guess_font description
	    if [ "$fontface" = "$RET" ]; then
		fontface=guess
	    fi
	    ;;
	4)
            if [ "$kernel" = freebsd ]; then
	        db_set console-setup/fontsize "$FONTSIZE"
		# skip the question without making Debconf loop
		STATE=$(( $STATE + $STATE - $old_state ))
            else
	        fontsizes=`available_fontsizes`
	        # add commas
	        choices=`echo "$fontsizes" | sed -e 's/$/,/g' `
	        # remove newlines and the last comma
	        choices=`echo $choices | sed -e 's/,$//'`
	        if [ -n "$choices" -a "$FONTSIZE" != guess ]; then
		    if echo "$choices" | grep -q x; then
		        size_template=console-setup/fontsize-fb47
		    else
		        size_template=console-setup/fontsize-text47
		    fi
		    db_subst $size_template CHOICES "$choices"
		    db_input medium $size_template || true
		    if db_go; then
		        STATE=$(($STATE + 1))
		    else
		        STATE=$(($STATE - 1))
		    fi
		    db_get $size_template
		    FONTSIZE=`encode_fontsize "$RET"`
	        else
                    FONTSIZE=${choices:+guess}
		    STATE=$(( $STATE + $STATE - $old_state ))
                fi
	        db_set console-setup/fontsize "$FONTSIZE"
	    fi
	    ;;
	*)
	    break
	    ;;
    esac
    old_state=$starting_state
done

if [ $STATE -eq 0 ]; then
    exit 10
fi

exit 0