From 64883e34b1e44a60de1833c9efee1c0647c16b94 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 4 Sep 2018 21:35:12 +0200 Subject: Make the default language of the Live ISO configurable Added a new parameter to 'make_slackware_live.sh' script: -l For example, create a liveslak ISO with dutch as the default language instead of US english: # ./make_slackware_live.sh -l nl Using this parameter you can onfigure a different default language for the resulting ISO image. The default localization if you do not supply this parameter remains "us" as before. The boot menu offers a selection of other languages/localizations to pick from (currently you can select any of 'be br da gb de de_ch es fr fr_ch it ja nl pt ru se us') but now you can create your own brand of liveslak ISO with your own language as the default. --- liveinit.tpl | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'liveinit.tpl') diff --git a/liveinit.tpl b/liveinit.tpl index 58011fb..39f42e7 100755 --- a/liveinit.tpl +++ b/liveinit.tpl @@ -55,6 +55,11 @@ CFGACTION="" # What extensions do we support for squashfs modules? SQ_EXT_AVAIL="@SQ_EXT_AVAIL@" +# Defaults for keyboard, language and timezone: +DEF_KBD=@DEF_KBD@ +DEF_LOCALE=@DEF_LOCALE@ +DEF_TZ=@DEF_TZ@ + # By default, let the media determine if we can write persistent changes: # However, if we define TORAM=1, we will also set VIRGIN=1 since we want # to avoid anything that writes to disk after we copy the OS to RAM. @@ -319,12 +324,6 @@ sleep $WAIT # Fire at least one blkid: blkid 1>/dev/null 2>/dev/null -# Load a custom keyboard mapping: -if [ -n "$KEYMAP" ]; then - echo "${MARKER}: Loading '$KEYMAP' keyboard mapping:" - tar xzOf /etc/keymaps.tar.gz ${KEYMAP}.bmap | loadkmap -fi - if [ "$RESCUE" = "" ]; then if [ $LOCALHD -eq 1 ]; then # We will initialize RAID/LVM/BTRFS on local harddisks: @@ -741,6 +740,24 @@ if [ "$RESCUE" = "" ]; then fi fi + # Some variables require a value before continuing, so if they were not set + # on the boot commandline nor in a config file, we take care of it now: + if [ -z "$KEYMAP" ]; then + KEYMAP="${DEF_KBD}" + fi + if [ -z "$TZ" ]; then + TZ="${DEF_TZ}" + fi + if [ -z "$LOCALE" ]; then + LOCALE="${DEF_LOCALE}" + fi + + # Load a custom keyboard mapping: + if [ -n "$KEYMAP" ]; then + echo "${MARKER}: Loading '$KEYMAP' keyboard mapping:" + tar xzOf /etc/keymaps.tar.gz ${KEYMAP}.bmap | loadkmap + fi + # Start assembling our live system components below /mnt/live : mkdir /mnt/live -- cgit v1.2.3