##// END OF EJS Templates
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list -Fix: check for kernel_threads -Fix: Cryptfs Kernel parameters -Renamed: Kernel_reduce renamed for better varaible grouping to Reduce_kernel -Fix: defaultgov check in 13-kernel.sh -Dropped: Enable_DHCP - now seperated in Enable_eth_dhcp and enable_wifi_dhcp -Feature: Dhcp and static configuration of both wired and wifi interface -Feature: added uart_2ndstage=1 for even more uart output in early stages -Renamed: eth.network and wlan.network to eth0 and wlan0 -Improve: sanity check for stattic ip -Renamed: Enable_SSHD to SSH_Enable for better variable gouping -Renamed PASSWORD to ROOT_PASSWORD for better distinction with USER_PASSWORD -Improved: Enable_dbus check on firstboot (generate-machineid) -improved: Reduce if ipv6 disable remove xtables -Improved: recomend $Release if xorg is enabled on some rpi models -Install wpasupplicant if Enabled_wireless is true -Reorder key:value in rpi23-gen-image.sh -fixing some wrong var assingments and missing declarations in rpi23-gen-image.sh -updated precompiled kernel links - changed the following default values: "Reduce_*,cryptfs_keysize (support for 0 and 1),rpi_model" - added a complete config (rpi3buster-fullconfig) in sync with new order of key:value in rpi23-gen-image.sh thx to trampeltier@fsfe for testing a lot!

Fichier de la dernière révision:

r617:18c8df625662
r732:4551fcf06923
Show More
12-locale.sh
66 lines | 2.8 KiB | application/x-sh | BashLexer
#
# Setup Locales and keyboard settings
#
# Load utility functions
. ./functions.sh
# Install and setup timezone
echo "${TIMEZONE}" > "${ETC_DIR}/timezone"
if [ -f "${ETC_DIR}/localtime" ]; then
# 1. If 11-apt.sh upgrades the package 'tzdata', '/etc/localtime' was created
# because 'dpkg-reconfigure -f noninteractive tzdata' was executed by apt-get.
# 2. If '/etc/localtime' exists, our execution of 'dpkg-reconfigure -f noninteractive tzdata'
# will ignore the our timezone set in '/etc/timezone'.
# 3. Removing /etc/localtime will solve this.
rm -f "${ETC_DIR}/localtime"
fi
chroot_exec dpkg-reconfigure -f noninteractive tzdata
# Install and setup default locale and keyboard configuration
if [ "$(echo "$APT_INCLUDES" | grep ",locales")" ] ; then
# Set locale choice in debconf db, even though dpkg-reconfigure ignores and overwrites them due to some bug
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684134 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685957
# ... so we have to set locales manually
if [ "$DEFLOCAL" = "en_US.UTF-8" ] ; then
chroot_exec echo "locales locales/locales_to_be_generated multiselect ${DEFLOCAL} UTF-8 | debconf-set-selections"
else
# en_US.UTF-8 should be available anyway : https://www.debian.org/doc/manuals/debian-reference/ch08.en.html#_the_reconfiguration_of_the_locale
chroot_exec echo "locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8, ${DEFLOCAL} UTF-8 | debconf-set-selections"
sed -i "/en_US.UTF-8/s/^#//" "${ETC_DIR}/locale.gen"
fi
sed -i "/${DEFLOCAL}/s/^#//" "${ETC_DIR}/locale.gen"
chroot_exec echo "locales locales/default_environment_locale select ${DEFLOCAL} | debconf-set-selections"
chroot_exec locale-gen
chroot_exec update-locale LANG="${DEFLOCAL}"
# Install and setup default keyboard configuration
if [ "$XKB_MODEL" != "" ] ; then
sed -i "s/^XKBMODEL.*/XKBMODEL=\"${XKB_MODEL}\"/" "${ETC_DIR}/default/keyboard"
fi
if [ "$XKB_LAYOUT" != "" ] ; then
sed -i "s/^XKBLAYOUT.*/XKBLAYOUT=\"${XKB_LAYOUT}\"/" "${ETC_DIR}/default/keyboard"
fi
if [ "$XKB_VARIANT" != "" ] ; then
sed -i "s/^XKBVARIANT.*/XKBVARIANT=\"${XKB_VARIANT}\"/" "${ETC_DIR}/default/keyboard"
fi
if [ "$XKB_OPTIONS" != "" ] ; then
sed -i "s/^XKBOPTIONS.*/XKBOPTIONS=\"${XKB_OPTIONS}\"/" "${ETC_DIR}/default/keyboard"
fi
chroot_exec dpkg-reconfigure -f noninteractive keyboard-configuration
# Install and setup font console
case "${DEFLOCAL}" in
*UTF-8)
sed -i 's/^CHARMAP.*/CHARMAP="UTF-8"/' "${ETC_DIR}/default/console-setup"
;;
*)
sed -i 's/^CHARMAP.*/CHARMAP="guess"/' "${ETC_DIR}/default/console-setup"
;;
esac
chroot_exec dpkg-reconfigure -f noninteractive console-setup
else # (no locales were installed)
# Install POSIX default locale
install_readonly files/locales/locale "${ETC_DIR}/default/locale"
fi