Support regional config settings (#323)

This commit is contained in:
Joshua Bussdieker 2019-08-14 03:26:55 -07:00 committed by XECDesign
parent 8110eb4891
commit d1f7a38905
5 changed files with 28 additions and 5 deletions

View File

@ -78,6 +78,22 @@ The following environment variables are supported:
Setting to '1' enables the QEMU mode - creating an image that can be mounted via QEMU for an emulated Setting to '1' enables the QEMU mode - creating an image that can be mounted via QEMU for an emulated
environment. These images include "-qemu" in the image file name. environment. These images include "-qemu" in the image file name.
* `LOCALE_DEFAULT` (Default: "en_GB.UTF-8" )
Default system locale.
* `KEYBOARD_KEYMAP` (Default: "gb" )
Default keyboard keymap.
* `KEYBOARD_LAYOUT` (Default: "English (UK)" )
Default keyboard layout.
* `TIMEZONE_DEFAULT` (Default: "Europe/London" )
Default keyboard layout.
* `FIRST_USER_NAME` (Default: "pi" ) * `FIRST_USER_NAME` (Default: "pi" )
Username for the first user Username for the first user

View File

@ -168,6 +168,13 @@ export WPA_PASSWORD
export WPA_COUNTRY export WPA_COUNTRY
export ENABLE_SSH="${ENABLE_SSH:-0}" export ENABLE_SSH="${ENABLE_SSH:-0}"
export LOCALE_DEFAULT="${LOCALE_DEFAULT:-en_GB.UTF-8}"
export KEYBOARD_KEYMAP="${KEYBOARD_KEYMAP:-gb}"
export KEYBOARD_LAYOUT="${KEYBOARD_LAYOUT:-English (UK)}"
export TIMEZONE_DEFAULT="${TIMEZONE_DEFAULT:-Europe/London}"
export GIT_HASH=${GIT_HASH:-"$(git rev-parse HEAD)"} export GIT_HASH=${GIT_HASH:-"$(git rev-parse HEAD)"}
export BASE_DIR export BASE_DIR

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ keyboard-configuration keyboard-configuration/altgr select The default for the k
keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC
# Keymap to use: # Keymap to use:
# Choices: American English, Albanian, Arabic, Asturian, Bangladesh, Belarusian, Bengali, Belgian, Bosnian, Brazilian, British English, Bulgarian, Bulgarian (phonetic layout), Burmese, Canadian French, Canadian Multilingual, Catalan, Chinese, Croatian, Czech, Danish, Dutch, Dvorak, Dzongkha, Esperanto, Estonian, Ethiopian, Finnish, French, Georgian, German, Greek, Gujarati, Gurmukhi, Hebrew, Hindi, Hungarian, Icelandic, Irish, Italian, Japanese, Kannada, Kazakh, Khmer, Kirghiz, Korean, Kurdish (F layout), Kurdish (Q layout), Lao, Latin American, Latvian, Lithuanian, Macedonian, Malayalam, Nepali, Northern Sami, Norwegian, Persian, Philippines, Polish, Portuguese, Punjabi, Romanian, Russian, Serbian (Cyrillic), Sindhi, Sinhala, Slovak, Slovenian, Spanish, Swedish, Swiss French, Swiss German, Tajik, Tamil, Telugu, Thai, Tibetan, Turkish (F layout), Turkish (Q layout), Ukrainian, Uyghur, Vietnamese # Choices: American English, Albanian, Arabic, Asturian, Bangladesh, Belarusian, Bengali, Belgian, Bosnian, Brazilian, British English, Bulgarian, Bulgarian (phonetic layout), Burmese, Canadian French, Canadian Multilingual, Catalan, Chinese, Croatian, Czech, Danish, Dutch, Dvorak, Dzongkha, Esperanto, Estonian, Ethiopian, Finnish, French, Georgian, German, Greek, Gujarati, Gurmukhi, Hebrew, Hindi, Hungarian, Icelandic, Irish, Italian, Japanese, Kannada, Kazakh, Khmer, Kirghiz, Korean, Kurdish (F layout), Kurdish (Q layout), Lao, Latin American, Latvian, Lithuanian, Macedonian, Malayalam, Nepali, Northern Sami, Norwegian, Persian, Philippines, Polish, Portuguese, Punjabi, Romanian, Russian, Serbian (Cyrillic), Sindhi, Sinhala, Slovak, Slovenian, Spanish, Swedish, Swiss French, Swiss German, Tajik, Tamil, Telugu, Thai, Tibetan, Turkish (F layout), Turkish (Q layout), Ukrainian, Uyghur, Vietnamese
keyboard-configuration keyboard-configuration/xkb-keymap select gb keyboard-configuration keyboard-configuration/xkb-keymap select ${KEYBOARD_KEYMAP}
# Compose key: # Compose key:
# Choices: No compose key, Right Alt (AltGr), Right Control, Right Logo key, Menu key, Left Logo key, Caps Lock # Choices: No compose key, Right Alt (AltGr), Right Control, Right Logo key, Menu key, Left Logo key, Caps Lock
keyboard-configuration keyboard-configuration/compose select No compose key keyboard-configuration keyboard-configuration/compose select No compose key
@ -23,4 +23,4 @@ keyboard-configuration keyboard-configuration/compose select No compose key
keyboard-configuration keyboard-configuration/ctrl_alt_bksp boolean true keyboard-configuration keyboard-configuration/ctrl_alt_bksp boolean true
# Keyboard layout: # Keyboard layout:
# Choices: English (UK), English (UK) - English (UK\, Colemak), English (UK) - English (UK\, Dvorak with UK punctuation), English (UK) - English (UK\, Dvorak), English (UK) - English (UK\, Macintosh international), English (UK) - English (UK\, Macintosh), English (UK) - English (UK\, extended WinKeys), English (UK) - English (UK\, international with dead keys), Other # Choices: English (UK), English (UK) - English (UK\, Colemak), English (UK) - English (UK\, Dvorak with UK punctuation), English (UK) - English (UK\, Dvorak), English (UK) - English (UK\, Macintosh international), English (UK) - English (UK\, Macintosh), English (UK) - English (UK\, extended WinKeys), English (UK) - English (UK\, international with dead keys), Other
keyboard-configuration keyboard-configuration/variant select English (UK) keyboard-configuration keyboard-configuration/variant select ${KEYBOARD_LAYOUT}

View File

@ -1,6 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
echo "Europe/London" > "${ROOTFS_DIR}/etc/timezone" echo "${TIMEZONE_DEFAULT}" > "${ROOTFS_DIR}/etc/timezone"
rm "${ROOTFS_DIR}/etc/localtime" rm "${ROOTFS_DIR}/etc/localtime"
on_chroot << EOF on_chroot << EOF