ubuntu-22.04.3-desktop-amd64/casper/filesystem/usr/share/ubiquity/console-setup-apply

30 lines
1.2 KiB
Bash
Executable File

#! /bin/sh
set -e
if [ -n "$UBIQUITY_OEM_USER_CONFIG" ]; then
setupcon --save-only
update-initramfs -u >&2
else
. /usr/share/debconf/confmodule
mkdir -p /target/etc/default
cp -a /etc/default/keyboard /target/etc/default/
chroot /target setupcon --save-only
if db_get oem-config/enable && [ "$RET" = true ]; then
# Discard meaningless values from the live filesystem build, since
# we won't copy in our own answers in OEM mode.
for template in \
keyboard-configuration/other keyboard-configuration/model keyboard-configuration/layout keyboard-configuration/variant keyboard-configuration/toggle keyboard-configuration/switch keyboard-configuration/altgr keyboard-configuration/compose keyboard-configuration/xkb-keymap keyboard-configuration/modelcode keyboard-configuration/layoutcode keyboard-configuration/variantcode keyboard-configuration/optionscode keyboard-configuration/store_defaults_in_debconf_db
## SEEN TEMPLATES ## all templates of keyb-conf except alerts and ctrl_alt_bksp
do
echo RESET $template
done | chroot /target debconf-communicate >/dev/null
fi
apt-install keyboard-configuration || true
apt-install console-setup || true
fi
exit 0