Finally fix language
This commit is contained in:
parent
2ba69a64d7
commit
ddc2cd03a6
|
@ -1,21 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo -e '\nDebconf for package 'keyboard-configuration' pre:'
|
||||
debconf-show "keyboard-configuration"
|
||||
$ROOTCMD debconf-show "keyboard-configuration"
|
||||
|
||||
echo -e '\nLoading selections for file:'
|
||||
SELECTIONS="$(cat "/tmp/debconf.txt")"
|
||||
SELECTIONS="$(cat "$FAI/debconf/HW4F_DESKTOP")"
|
||||
|
||||
echo -e '\nSetting selections:'
|
||||
$ROOTCMD debconf-set-selections -v <<< "$SELECTIONS"
|
||||
|
||||
### WORK AROUND A BUG IN UBUNTU WHICH IGNORES DEBCONF
|
||||
XKBMODEL="$(grep "keyboard-configuration/modelcode" <<< "$SELECTIONS")"
|
||||
XKBLAYOUT="$(grep "keyboard-configuration/layoutcode" <<< "$SELECTIONS")"
|
||||
XKBVARIANT="$(grep "keyboard-configuration/variantcode" <<< "$SELECTIONS")"
|
||||
XKBOPTIONS="$(grep "keyboard-configuration/optionscode" <<< "$SELECTIONS")"
|
||||
|
||||
$ROOTCMD cat <<EOF > /etc/default/keyboard
|
||||
dc_get () {
|
||||
grep "$1" <<< "$SELECTIONS" \
|
||||
|awk '{print $4}'
|
||||
}
|
||||
|
||||
XKBMODEL="$(dc_get "keyboard-configuration/modelcode")"
|
||||
XKBLAYOUT="$(dc_get "keyboard-configuration/layoutcode")"
|
||||
XKBVARIANT="$(dc_get "keyboard-configuration/variantcode")"
|
||||
XKBOPTIONS="$(dc_get "keyboard-configuration/optionscode")"
|
||||
|
||||
cat <<EOF | $ROOTCMD tee /etc/default/keyboard
|
||||
# KEYBOARD CONFIGURATION FILE
|
||||
|
||||
# Consult the keyboard(5) manual page.
|
||||
|
@ -31,6 +37,9 @@ EOF
|
|||
### RECONFIGURE PACKAGES
|
||||
PACKAGES="$(awk '{print $1}' <<< "$SELECTIONS" | sort -u)"
|
||||
for PACKAGE in $PACKAGES; do
|
||||
echo -e '\n'"Debconf for package '$PACKAGE' pre-configure:"
|
||||
$ROOTCMD debconf-show "$PACKAGE"
|
||||
|
||||
echo -e '\n'"Reconfiguring package '$PACKAGE'"
|
||||
$ROOTCMD dpkg-reconfigure -f noninteractive "$PACKAGE"
|
||||
|
||||
|
|
Loading…
Reference in New Issue