diff options
author | Jan Wagner <mail@jwagner.eu> | 2016-04-19 15:10:50 +0200 |
---|---|---|
committer | Jan Wagner <mail@jwagner.eu> | 2016-04-19 15:10:50 +0200 |
commit | d0f91512d9ca6d361d8a4a387094c48aab00e111 (patch) | |
tree | b00ed220e2fa04bdb1db43475a8149d01d1be5db /bootstrap.d/12-locale.sh | |
parent | 7878e85af7748d531a64f459723dca76ee37914b (diff) | |
download | rpi2-gen-image-master.tar.gz rpi2-gen-image-master.tar.bz2 rpi2-gen-image-master.zip |
Diffstat (limited to 'bootstrap.d/12-locale.sh')
-rw-r--r-- | bootstrap.d/12-locale.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bootstrap.d/12-locale.sh b/bootstrap.d/12-locale.sh index d82f212..bd1edf4 100644 --- a/bootstrap.d/12-locale.sh +++ b/bootstrap.d/12-locale.sh @@ -6,7 +6,7 @@ . ./functions.sh # Install and setup timezone -echo ${TIMEZONE} > "$R/etc/timezone" +echo ${TIMEZONE} > "${ETCDIR}/timezone" chroot_exec dpkg-reconfigure -f noninteractive tzdata # Install and setup default locale and keyboard configuration @@ -19,40 +19,40 @@ if [ "$ENABLE_MINBASE" = false ] ; then 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/^#//" "$R/etc/locale.gen" + sed -i "/en_US.UTF-8/s/^#//" "${ETCDIR}/locale.gen" fi - sed -i "/${DEFLOCAL}/s/^#//" "$R/etc/locale.gen" + sed -i "/${DEFLOCAL}/s/^#//" "${ETCDIR}/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}\"/" "$R/etc/default/keyboard" + sed -i "s/^XKBMODEL.*/XKBMODEL=\"${XKB_MODEL}\"/" "${ETCDIR}/default/keyboard" fi if [ "$XKB_LAYOUT" != "" ] ; then - sed -i "s/^XKBLAYOUT.*/XKBLAYOUT=\"${XKB_LAYOUT}\"/" "$R/etc/default/keyboard" + sed -i "s/^XKBLAYOUT.*/XKBLAYOUT=\"${XKB_LAYOUT}\"/" "${ETCDIR}/default/keyboard" fi if [ "$XKB_VARIANT" != "" ] ; then - sed -i "s/^XKBVARIANT.*/XKBVARIANT=\"${XKB_VARIANT}\"/" "$R/etc/default/keyboard" + sed -i "s/^XKBVARIANT.*/XKBVARIANT=\"${XKB_VARIANT}\"/" "${ETCDIR}/default/keyboard" fi if [ "$XKB_OPTIONS" != "" ] ; then - sed -i "s/^XKBOPTIONS.*/XKBOPTIONS=\"${XKB_OPTIONS}\"/" "$R/etc/default/keyboard" + sed -i "s/^XKBOPTIONS.*/XKBOPTIONS=\"${XKB_OPTIONS}\"/" "${ETCDIR}/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"/' "$R/etc/default/console-setup" + sed -i 's/^CHARMAP.*/CHARMAP="UTF-8"/' "${ETCDIR}/default/console-setup" ;; *) - sed -i 's/^CHARMAP.*/CHARMAP="guess"/' "$R/etc/default/console-setup" + sed -i 's/^CHARMAP.*/CHARMAP="guess"/' "${ETCDIR}/default/console-setup" ;; esac chroot_exec dpkg-reconfigure -f noninteractive console-setup else # ENABLE_MINBASE=true # Install POSIX default locale - install_readonly files/locales/locale "$R/etc/default/locale" + install_readonly files/locales/locale "${ETCDIR}/default/locale" fi |