File: console-setup-udeb.base-installer

package info (click to toggle)
console-setup 1.164
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 28,464 kB
  • sloc: perl: 10,923; xml: 5,812; sh: 3,891; makefile: 785
file content (36 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (10)
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
#! /bin/sh
set -e

. /usr/share/debconf/confmodule

## KEYBOARD_PRESENT ## Will be replaced by keyboard_present function

# keyboard_present () {
#     if there is a keyboard; then
# 	return 0
#     else
# 	return 1
#     fi
# }

if keyboard_present; then
    mkdir -p /target/etc/default
    cp -a /etc/default/keyboard /target/etc/default/
    LANG=C
    export LANG
    # create the required templates
    debconf-copydb -p "^keyboard-configuration/.*$" configdb target_configdb

    # mark the questions as seen
    for template in \
## SEEN TEMPLATES ## all templates of keyb-conf except alerts and ctrl_alt_bksp
    do
	echo keyboard-configuration $template seen true
    done | chroot /target debconf-set-selections
######################################################################

    apt-install keyboard-configuration || true
    apt-install console-setup || true
fi

exit 0