File: finish-install

package info (click to toggle)
localechooser 1.37
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 708 kB
  • ctags: 24
  • sloc: sh: 740; perl: 201; makefile: 82; awk: 42; python: 38
file content (87 lines) | stat: -rw-r--r-- 2,441 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#! /bin/sh

set -e

. /usr/share/debconf/confmodule

ARCH=`udpkg --print-architecture`

modify_cyrconfig() {
	if [ "$2" ]; then
		sed -e "s/^$1 .*\$/$1 $2/" \
		    $cyrconfig > $cyrconfig.tmp && \
		    mv $cyrconfig.tmp $cyrconfig
	fi
}

db_get debian-installer/locale
LOCALE="$RET"

# Set locale to C if it has not yet been set
# This can happen during e.g. s390 installs where localechooser is not run
[ -z "$LOCALE" ] && LOCALE="C"

LANGUAGE=${LOCALE%%_*}

# Install specific packages depending on selected language

if [ "$LOCALE" != "C" ] ; then
	# Other language specific packages
	case "$LANGUAGE" in
	    ar|he|fa)
		# RTL languages (Arabic, Hebrew, Farsi)
		apt-install libfribidi0 || true
		;;
	esac
fi

# Install localization-config except when no localization happens
# Install it anyway for powerpc (to handle subarches)
# Disabled for etch as l-c is not ready
#if [ "$LOCALE" != "C" ] || [ "$ARCH" = "powerpc" ]; then
#        apt-install localization-config || true
#fi


db_get debian-installer/consoledisplay || true
consoletype=`echo $RET | sed -e 's/=.*$//'`
case "$consoletype" in
    kbd)
	consolefont=`echo $RET | sed -e 's/^kbd=//'`
	if apt-install console-tools; then
		ctconfig=/target/etc/console-tools/config
		acm=`echo $consolefont | sed -e 's/.*(//' -e 's/).*//'`
		[ "$acm" = utf8 ] && acm=
		# A few workarounds of console-tools limitations below
		# APP_CHARSET_MAP and console fonts are not set
		# for all consoles. These workarounds should probably
		# be removed when we switch to kbd
		if [ -n "$acm" ]; then
			echo "APP_CHARSET_MAP=$acm" >>$ctconfig
			echo "APP_CHARSET_MAP_vc1=$acm" >>$ctconfig
			echo "APP_CHARSET_MAP_vc2=$acm" >>$ctconfig
			echo "APP_CHARSET_MAP_vc3=$acm" >>$ctconfig
			echo "APP_CHARSET_MAP_vc4=$acm" >>$ctconfig
			echo "APP_CHARSET_MAP_vc5=$acm" >>$ctconfig
			echo "APP_CHARSET_MAP_vc6=$acm" >>$ctconfig
		fi
		consolefont=`echo $consolefont | sed -e 's/(.*//'`
		if [ -n "$consolefont" ]; then
			echo "SCREEN_FONT=$consolefont" >>$ctconfig
			echo "SCREEN_FONT_vc2=$consolefont" >>$ctconfig
			echo "SCREEN_FONT_vc3=$consolefont" >>$ctconfig
			echo "SCREEN_FONT_vc4=$consolefont" >>$ctconfig
			echo "SCREEN_FONT_vc5=$consolefont" >>$ctconfig
			echo "SCREEN_FONT_vc6=$consolefont" >>$ctconfig
		fi
		if echo "$consolefont" | grep -q "Terminus"; then
			apt-install console-terminus || true
		fi
	fi
	;;
    cyr)
	apt-install console-cyrillic || true
	;;
esac

exit 0