diff options
author | Jan Wagner <mail@jwagner.eu> | 2016-03-12 16:07:25 +0100 |
---|---|---|
committer | Jan Wagner <mail@jwagner.eu> | 2016-03-12 16:07:25 +0100 |
commit | 4aa8ac6985680eb12ba5c82422ecc50e2bb55447 (patch) | |
tree | a85e15805b773c5218ccb0a279490c98eec41e81 /bootstrap.d/12-locale.sh | |
parent | 80185bd93dd9eecb1b41ef8ac9a186aff19ab33e (diff) | |
download | rpi2-gen-image-4aa8ac6985680eb12ba5c82422ecc50e2bb55447.tar.gz rpi2-gen-image-4aa8ac6985680eb12ba5c82422ecc50e2bb55447.tar.bz2 rpi2-gen-image-4aa8ac6985680eb12ba5c82422ecc50e2bb55447.zip |
spliting more files, fix-uboot, fix-fbturbo, fix-locale
Diffstat (limited to 'bootstrap.d/12-locale.sh')
-rw-r--r-- | bootstrap.d/12-locale.sh | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/bootstrap.d/12-locale.sh b/bootstrap.d/12-locale.sh index de1ecc9..cc19ed0 100644 --- a/bootstrap.d/12-locale.sh +++ b/bootstrap.d/12-locale.sh @@ -1,7 +1,8 @@ # -# Setup locales and keyboard settings +# Setup Locales and keyboard settings # +# Load utility functions . ./functions.sh # Set up timezone @@ -20,25 +21,27 @@ if [ "$ENABLE_MINBASE" = false ] ; then chroot_exec echo "locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8, ${DEFLOCAL} UTF-8" | debconf-set-selections chroot_exec sed -i "/en_US.UTF-8/s/^#//" /etc/locale.gen fi + chroot_exec sed -i "/${DEFLOCAL}/s/^#//" /etc/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} # Keyboard configuration, if requested - if [ "$XKBMODEL" != "" ] ; then - chroot_exec sed -i "s/^XKBMODEL.*/XKBMODEL=\"${XKBMODEL}\"/" /etc/default/keyboard + if [ "$XKB_MODEL" != "" ] ; then + chroot_exec sed -i "s/^XKBMODEL.*/XKBMODEL=\"${XKB_MODEL}\"/" /etc/default/keyboard fi - if [ "$XKBLAYOUT" != "" ] ; then - chroot_exec sed -i "s/^XKBLAYOUT.*/XKBLAYOUT=\"${XKBLAYOUT}\"/" /etc/default/keyboard + if [ "$XKB_LAYOUT" != "" ] ; then + chroot_exec sed -i "s/^XKBLAYOUT.*/XKBLAYOUT=\"${XKB_LAYOUT}\"/" /etc/default/keyboard fi - if [ "$XKBVARIANT" != "" ] ; then - chroot_exec sed -i "s/^XKBVARIANT.*/XKBVARIANT=\"${XKBVARIANT}\"/" /etc/default/keyboard + if [ "$XKB_VARIANT" != "" ] ; then + chroot_exec sed -i "s/^XKBVARIANT.*/XKBVARIANT=\"${XKB_VARIANT}\"/" /etc/default/keyboard fi - if [ "$XKBOPTIONS" != "" ] ; then - chroot_exec sed -i "s/^XKBOPTIONS.*/XKBOPTIONS=\"${XKBOPTIONS}\"/" /etc/default/keyboard + if [ "$XKB_OPTIONS" != "" ] ; then + chroot_exec sed -i "s/^XKBOPTIONS.*/XKBOPTIONS=\"${XKB_OPTIONS}\"/" /etc/default/keyboard fi chroot_exec dpkg-reconfigure -f noninteractive keyboard-configuration + # Set up font console case "${DEFLOCAL}" in *UTF-8) @@ -49,4 +52,7 @@ if [ "$ENABLE_MINBASE" = false ] ; then ;; esac chroot_exec dpkg-reconfigure -f noninteractive console-setup +else + # Set POSIX default locales + install_readonly files/locales/locale $R/etc/default/locale fi |