summaryrefslogtreecommitdiffstats
path: root/liveinit.tpl
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2018-09-04 21:35:12 +0200
committer Eric Hameleers <alien@slackware.com>2018-09-04 21:35:12 +0200
commit64883e34b1e44a60de1833c9efee1c0647c16b94 (patch)
treef0824de8b0e36cfb6a85e3711cdd3661632f13c8 /liveinit.tpl
parent0f8b5cc6f83090f8c08b5e54b63956ae330e7eaf (diff)
downloadliveslak-64883e34b1e44a60de1833c9efee1c0647c16b94.tar.gz
liveslak-64883e34b1e44a60de1833c9efee1c0647c16b94.tar.xz
Make the default language of the Live ISO configurable
Added a new parameter to 'make_slackware_live.sh' script: -l <localization> 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.
Diffstat (limited to 'liveinit.tpl')
-rwxr-xr-xliveinit.tpl29
1 files changed, 23 insertions, 6 deletions
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