summaryrefslogtreecommitdiff
path: root/configs/profile/root-image/root/.session/session-init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'configs/profile/root-image/root/.session/session-init.sh')
-rwxr-xr-xconfigs/profile/root-image/root/.session/session-init.sh103
1 files changed, 0 insertions, 103 deletions
diff --git a/configs/profile/root-image/root/.session/session-init.sh b/configs/profile/root-image/root/.session/session-init.sh
deleted file mode 100755
index 250f39a..0000000
--- a/configs/profile/root-image/root/.session/session-init.sh
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/bash
-
-source $(cd $(dirname ${BASH_SOURCE[0]}) ; pwd)/session-common.sh.inc
-
-
-readonly TIMEOUT=30
-readonly H=15
-readonly W=42
-readonly N_ITEMS=10
-
-readonly LANG_TITLE="System language selection"
-readonly LANG_PROMPT="Choose your language:"
-readonly LANG_DEFAULT='en_US.UTF-8'
-readonly KEYMAP_TITLE="System keymap selection"
-readonly KEYMAP_PROMPT="Choose your keymap:"
-readonly KEYMAP_DEFAULT='us'
-readonly SESSION_TITLE="Launch installer or command-line"
-readonly SESSION_PROMPT="Would you like to start the installer, or drop onto the command line?"
-
-readonly -a LANGUAGES=( $(cat "${WIZARD_DIR}"/LANGUAGES) )
-readonly -a ESPERANTO_LANG_PACKS=( 'iceweasel-l10n-es-eo' )
-readonly -a SPANISH_LANG_PACKS=( 'iceweasel-l10n-es-ar' 'icedove-l10n-es-ar'
- 'iceweasel-l10n-es-cl'
- 'iceweasel-l10n-es-es' 'icedove-l10n-es-es'
- 'iceweasel-l10n-es-mx' )
-readonly -a FRENCH_LANG_PACKS=( 'iceweasel-l10n-fr' 'icedove-l10n-fr' )
-readonly -a GALEGO_LANG_PACKS=( 'iceweasel-l10n-gl' 'icedove-l10n-gl' )
-readonly -a ITALIAN_LANG_PACKS=( 'iceweasel-l10n-it' 'icedove-l10n-it' )
-readonly -a POLISH_LANG_PACKS=( 'iceweasel-l10n-pl' 'icedove-l10n-pl' )
-readonly -a PORTUGUESE_LANG_PACKS=( 'iceweasel-l10n-pt-br' 'icedove-l10n-pt-br' )
-
-readonly -a KEYMAPS=( $(cat "${WIZARD_DIR}"/KEYMAPS_X) )
-
-readonly -a ALL_SESSIONS=( 'live' "Live desktop" \
- 'calamares' "GUI installer" \
- 'wizard' "TUI installer" \
- 'cli' "Command line" )
-case "$DESKTOP_SESSION" in # per .bash_profile
- 'lxde') readonly SESSIONS=( "${ALL_SESSIONS[@]}" ) ; readonly SESSION_DEFAULT='live' ;;
- 'mini') readonly SESSIONS=( "${ALL_SESSIONS[@]:2}" ) ; readonly SESSION_DEFAULT='calamares' ;;
- * ) readonly SESSIONS=( "${ALL_SESSIONS[@]:4}" ) ; readonly SESSION_DEFAULT='cli' ;;
-esac
-
-
-## prompt for language if not already selected ##
-
-Language=$(GetStateVar 'LANG')
-if [[ "${Language}" == '_UNDEFINED_' ]]
-then Language=$( InitDlg "$LANG_TITLE" "$LANG_PROMPT" $LANG_DEFAULT "${LANGUAGES[@]}" )
- [[ "${Language}" == "" ]] && Language=$LANG_DEFAULT
-
- logger "$0: selected language='${Language}'"
-
- # inject language packs into the install wizard package set
- Lang=${Language/_*/}
- case ${Lang} in
- 'eo') echo "${ESPERANTO_LANG_PACKS[@]}" >> "${WIZARD_DIR}"/packages ;;
- 'fr') echo "${FRENCH_LANG_PACKS[@]}" >> "${WIZARD_DIR}"/packages ;;
- 'gl') echo "${GALEGO_LANG_PACKS[@]}" >> "${WIZARD_DIR}"/packages ;;
- 'it') echo "${ITALIAN_LANG_PACKS[@]}" >> "${WIZARD_DIR}"/packages ;;
- 'pl') echo "${POLISH_LANG_PACKS[@]}" >> "${WIZARD_DIR}"/packages ;;
- 'pt') echo "${PORTUGUESE_LANG_PACKS[@]}" >> "${WIZARD_DIR}"/packages ;;
- 'es') echo "${SPANISH_LANG_PACKS[@]}" >> "${WIZARD_DIR}"/packages ;;
- esac
-
- # prepare locale
- echo "LANG=${Language}" > /etc/locale.conf
- SetStateVar 'LANG' ${Language}
-
- # prepare installer translations
- TrKey=$( [[ "${TRANSLATIONS}" =~ " ${Lang} " ]] && echo ${Lang} || echo 'en' )
- SetStateVar 'TR_KEY' ${TrKey}
-fi
-
-
-## prompt for X11 keymap if not already selected ##
-
-Keymap=$(GetStateVar 'XKBMAP')
-if [[ "${Keymap}" == '_UNDEFINED_' ]]
-then Keymap=$( InitDlg "$KEYMAP_TITLE" "$KEYMAP_PROMPT" $KEYMAP_DEFAULT "${KEYMAPS[@]}" )
- [[ "${Keymap}" == "" ]] && Keymap=$KEYMAP_DEFAULT
-
- logger "$0: selected keymap='${Keymap}'"
-
- # set keymap
- setxkbmap ${Keymap} 2> /dev/null
- SetStateVar 'XKBMAP' ${Keymap}
-fi
-
-
-## prompt to launch installer or CLI ##
-Session=$(GetStateVar 'SESSION')
-if [[ "${Session}" == '_UNDEFINED_' ]]
-then Session=$( InitDlg "$SESSION_TITLE" "$SESSION_PROMPT" $SESSION_DEFAULT "${SESSIONS[@]}" )
- [[ "${Session}" == "" ]] && Session=$SESSION_DEFAULT
-
- logger "$0: selected interface='${Session}'"
-
- # set installer interface
- SetStateVar 'SESSION' ${Session}
-fi
-
-clear