summaryrefslogtreecommitdiffstats
path: root/config/binary_local-hooks
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2011-09-10 14:11:20 +0200
committerTails developers <amnesia@boum.org>2012-03-09 19:06:43 +0100
commitc9e8ff30bc608a55f46ff79b1d034284edd3d63d (patch)
tree3535b76b6b6a5ddacf73e71ed9c93e3c4f0ed399 /config/binary_local-hooks
parent0225ef67a625d18e83200c9cc7b64c4d589c191a (diff)
Remove syslinux language choosing menu.
This branch is about using syslinux to select other kind of options. tails-greeter allows choosing a !English language.
Diffstat (limited to 'config/binary_local-hooks')
-rwxr-xr-xconfig/binary_local-hooks/20-syslinux_i18n133
1 files changed, 0 insertions, 133 deletions
diff --git a/config/binary_local-hooks/20-syslinux_i18n b/config/binary_local-hooks/20-syslinux_i18n
deleted file mode 100755
index 4ab2131..0000000
--- a/config/binary_local-hooks/20-syslinux_i18n
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/bin/bash
-
-# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
-
-# Setting static variables
-DESCRIPTION="$(Echo 'internationalizing the syslinux menu')"
-HELP=""
-USAGE="${PROGRAM}"
-
-# Reading configuration files
-Read_conffiles config/all config/common config/binary
-Set_defaults
-
-if [ "${LB_BOOTLOADER}" != "syslinux" ]
-then
- exit 0
-fi
-
-Echo_message "internationalizing the syslinux menu"
-
-# Get AMNESIA_SUPPORTED_LANGUAGES
-. config/amnesia
-if [ -e config/amnesia.local ] ; then
- . config/amnesia.local
-fi
-
-# Setting boot method specific variables
-case "${LB_BINARY_IMAGES}" in
- iso|iso-hybrid)
- SYSLINUX_PATH="binary/isolinux"
- ;;
- usb-hdd)
- SYSLINUX_PATH="binary/syslinux"
- ;;
-esac
-
-# Setting variables
-SYSLINUX_LIVE_CFG="${SYSLINUX_PATH}/live.cfg"
-ORIG_SYSLINUX_LIVE_CFG="${SYSLINUX_PATH}/live.cfg.orig"
-CFG_SNIPPET="${SYSLINUX_PATH}/tmp.cfg"
-
-# Backup the original live.cfg
-mv "${SYSLINUX_LIVE_CFG}" "${ORIG_SYSLINUX_LIVE_CFG}"
-
-# Get needed values from the original live.cfg
-ORIG_KERNEL="`grep -E --max-count=1 '^[ ]+kernel ' "${ORIG_SYSLINUX_LIVE_CFG}"`"
-ORIG_APPEND="`grep -E --max-count=1 '^[ ]+append ' "${ORIG_SYSLINUX_LIVE_CFG}"`"
-
-# Sanity checks
-if [ -z "${ORIG_KERNEL}" ]; then
- Echo_error "Could not parse kernel line in ${ORIG_SYSLINUX_LIVE_CFG}"
- exit 15
-fi
-if [ -z "${ORIG_APPEND}" ]; then
- Echo_error "Could not parse append line in ${ORIG_SYSLINUX_LIVE_CFG}"
- exit 16
-fi
-
-# Make sure all languages are visible in the menu
-NUM_LANGUAGES="$(echo ${AMNESIA_SUPPORTED_LANGUAGES} | wc -w)"
-echo "menu vshift $[24-${NUM_LANGUAGES}]" >> "${SYSLINUX_LIVE_CFG}"
-echo "menu rows ${NUM_LANGUAGES}" >> "${SYSLINUX_LIVE_CFG}"
-
-# Add menu entries
-for LANG_CODE in ${AMNESIA_SUPPORTED_LANGUAGES}; do
-
- case "${LANG_CODE}" in
- ar)
- LANG_NAME='^Arabic'
- LANG_APPEND='locales=ar_EG.UTF-8 keyboard-layouts=us,ara'
- ;;
- de)
- LANG_NAME='^German'
- LANG_APPEND='locales=de_DE.UTF-8 keyboard-layouts=de'
- ;;
- en)
- LANG_NAME='^English'
- LANG_APPEND=''
- ;;
- es)
- LANG_NAME='^Spanish'
- LANG_APPEND='locales=es keyboard-layouts=es'
- ;;
- fa)
- LANG_NAME='Fa^rsi'
- LANG_APPEND='locales=fa_IR.UTF-8 keyboard-layouts=us,ir'
- ;;
- fr)
- LANG_NAME='^French'
- LANG_APPEND='locales=fr_FR.UTF-8 keyboard-layouts=fr'
- ;;
- it)
- LANG_NAME='^Italian'
- LANG_APPEND='locales=it keyboard-layouts=it'
- ;;
- pt)
- LANG_NAME='^Portuguese'
- LANG_APPEND='locales=pt keyboard-layouts=pt'
- ;;
- ru)
- LANG_NAME='R^ussian'
- LANG_APPEND='locales=ru keyboard-layouts=us,ru'
- ;;
- vi)
- LANG_NAME='^Vietnamese'
- LANG_APPEND='locales=vi_VN.UTF-8 keyboard-layouts=vn'
- ;;
- zh)
- LANG_NAME='^Chinese'
- LANG_APPEND='locales=zh_CN.UTF-8'
- ;;
- *)
- Echo_error "Language ${LANG_CODE} is not supported yet, ask Tails developpers!"
- exit 17
- ;;
- esac
-
- echo "label tails-${LANG_CODE}" >> "${CFG_SNIPPET}"
- echo " menu label ${LANG_NAME}" >> "${CFG_SNIPPET}"
- if [ "${LANG_CODE}" = 'en' ]; then
- echo ' menu default' >> "${CFG_SNIPPET}"
- fi
- echo "${ORIG_KERNEL}" >> "${CFG_SNIPPET}"
- echo "${ORIG_APPEND} ${LANG_APPEND} " >> "${CFG_SNIPPET}"
- cat "${CFG_SNIPPET}" >> "${SYSLINUX_LIVE_CFG}"
-
- rm -f "${CFG_SNIPPET}"
-
-done
-
-# Cleanup
-rm -f "${ORIG_SYSLINUX_LIVE_CFG}"