diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2022-05-04 06:16:29 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2022-05-07 00:25:40 -0400 |
commit | a7eda8a0711ea2c436740d51706cb33a0edbf870 (patch) | |
tree | 99dc47c9950b55782c14bd184896a3b445c9cc10 /configs | |
parent | 41eba2474f5e6991a4b62fe2ad1dc5cec57a077c (diff) |
revertme - disable install wizard
Diffstat (limited to 'configs')
-rw-r--r-- | configs/profile/packages/packages-all.all | 2 | ||||
-rw-r--r-- | configs/profile/root-image/etc/motd | 4 | ||||
-rw-r--r-- | configs/profile/root-image/etc/skel/.bash_profile | 29 | ||||
-rwxr-xr-x | configs/profile/root-image/etc/skel/install.sh | 3 | ||||
-rw-r--r-- | configs/profile/root-image/root/.codecheck | 2 | ||||
-rwxr-xr-x | configs/profile/root-image/root/.language.sh | 209 | ||||
-rw-r--r-- | configs/profile/root-image/root/customize_root_image-constants.inc | 3 |
7 files changed, 219 insertions, 33 deletions
diff --git a/configs/profile/packages/packages-all.all b/configs/profile/packages/packages-all.all index 50b28c9..3481a31 100644 --- a/configs/profile/packages/packages-all.all +++ b/configs/profile/packages/packages-all.all @@ -33,7 +33,7 @@ ntfs-3g openconnect p7zip parabola-base -parabola-install-wizard +#parabola-install-wizard partclone parted partimage diff --git a/configs/profile/root-image/etc/motd b/configs/profile/root-image/etc/motd index d303b1c..df88dac 100644 --- a/configs/profile/root-image/etc/motd +++ b/configs/profile/root-image/etc/motd @@ -14,8 +14,4 @@ For help establishing an internet connection, enter this command: [01;37m# lynx network.html[0m - For an installation wizard, enter either of these commands: - [01;37m# ./install-openrc-lxde.sh[0m - [01;37m# ./install-systemd-mate.sh[0m - Press Alt+F1, Alt+F2, ..., Alt+F6 to switch virtual terminals. diff --git a/configs/profile/root-image/etc/skel/.bash_profile b/configs/profile/root-image/etc/skel/.bash_profile index 75b9903..5fa7530 100644 --- a/configs/profile/root-image/etc/skel/.bash_profile +++ b/configs/profile/root-image/etc/skel/.bash_profile @@ -3,24 +3,18 @@ # [[ -f ~/.bashrc ]] && . ~/.bashrc -IS_INITIAL_TTY=$( [[ -z "$DISPLAY" && "$(tty)" = /dev/tty1 ]] && echo 1 || echo 0 ) # set standard environment export EDITOR=nano -export DE='_DESKTOP_SESSION_' # gnome , kde , xfce , lxde , mate -export DESKTOP_SESSION='_DESKTOP_SESSION_' # lxde , mini , '' +export DE='_DESKTOP_SESSION_' # gnome, kde, xfce, lxde, mate +export DESKTOP_SESSION='_DESKTOP_SESSION_' # lxde ENABLE_TTS_BRLTTY='_ENABLE_TTS_BRLTTY_' # speech and braille -# customize environment -INSTALL_WIZARD_STATE_FILE=/var/lib/parabola-install-wizard/.session_state -INSTALL_WIZARD_INIT_FILE=/usr/lib/parabola-install-wizard/session-init.sh +# set custom environment sudo /root/.remote-script.sh -sed -i 's|^SESSION=.*|SESSION=_UNDEFINED_|' ${INSTALL_WIZARD_STATE_FILE} -(( $IS_INITIAL_TTY )) && sudo ${INSTALL_WIZARD_INIT_FILE} -Session=$(grep 'SESSION=' ${INSTALL_WIZARD_STATE_FILE} | cut -d '=' -f 2) -sed -i 's|^SESSION=.*|SESSION=_UNDEFINED_|' ${INSTALL_WIZARD_STATE_FILE} +sudo /root/.language.sh export $(cat /etc/locale.conf) @@ -28,16 +22,5 @@ export $(cat /etc/locale.conf) [[ "$ENABLE_TTS_BRLTTY" == 'true' ]] && flock -n /run/talk-to-me.lck /usr/bin/talk-to-me -# launch X, installer, or CLI -case ${Session} in -'calamares'|'live') - [[ "${Session}" == 'calamares' ]] && export DESKTOP_SESSION='mini' - exec startx - ;; -'wizard') - sudo /root/.session/install/install.sh - ;; -*) - cat /etc/motd - ;; -esac +# launch X +[ -n "$DESKTOP_SESSION" -a -z "$DISPLAY" -a "$(tty)" = /dev/tty1 ] && exec startx || cat /etc/motd diff --git a/configs/profile/root-image/etc/skel/install.sh b/configs/profile/root-image/etc/skel/install.sh deleted file mode 100755 index 384ecc4..0000000 --- a/configs/profile/root-image/etc/skel/install.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -sudo /root/.session/install/install.sh diff --git a/configs/profile/root-image/root/.codecheck b/configs/profile/root-image/root/.codecheck new file mode 100644 index 0000000..6d266bb --- /dev/null +++ b/configs/profile/root-image/root/.codecheck @@ -0,0 +1,2 @@ +LANG=_UNDEFINED_ +XKBMAP=_UNDEFINED_ diff --git a/configs/profile/root-image/root/.language.sh b/configs/profile/root-image/root/.language.sh new file mode 100755 index 0000000..9c35c73 --- /dev/null +++ b/configs/profile/root-image/root/.language.sh @@ -0,0 +1,209 @@ +#!/bin/bash + +readonly TIMEOUT=30 +readonly H=15 +readonly W=40 +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 INTERFACE_TITLE="Launch installer or command-line" +readonly INTERFACE_PROMPT="Would you like to start the installer, or drop onto the command line?" +readonly INTERFACE_DEFAULT='calamares' +readonly INTERFACES=( 'calamares' 'wizard' 'cli' ) + +readonly -a LANGUAGES=( 'en_US.UTF-8' "English" \ + 'eo' "Esperanto" \ + 'fr_FR.UTF-8' "French" \ + 'gl_ES.UTF-8' "Galego" \ + 'it_IT.UTF-8' "Italian" \ + 'pl_PL.UTF-8' "Polish" \ + 'pt_BR.UTF-8' "Portuguese" \ + 'es_ES.UTF-8' "Spanish" ) +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=( 'af' "Afrikaans-Lang" \ + 'al' "Albanian" \ + 'am' "Amharic" \ + 'ara' "Arabic" \ + 'at' "at" \ + 'au' "au" \ + 'az' "Azerbaijani" \ + 'ba' "Bashkir" \ + 'be' "Belarusian" \ + 'bg' "Bulgarian" \ + 'bn' "Bihari-Languages" \ + 'br' "Breton" \ + 'brai' "brai" \ + 'bt' "bt" \ + 'bw' "bw" \ + 'by' "by" \ + 'ca' "Catalan" \ + 'cd' "cd" \ + 'ch' "Chamorro" \ + 'cm' "cm" \ + 'cn' "cn" \ + 'cz' "Czech" \ + 'de' "German" \ + 'dk' "dk" \ + 'dz' "Dzongkha" \ + 'ee' "Ewe" \ + 'epo' "Esperanto" \ + 'es' "Spanish" \ + 'et' "Estonian" \ + 'fi' "Finnish" \ + 'fo' "Faroese" \ + 'fr' "French" \ + 'gb' "gb" \ + 'ge' "ge" \ + 'gh' "gh" \ + 'gn' "GuaranĂ" \ + 'gr' "gr" \ + 'hr' "Croatian" \ + 'hu' "Hungarian" \ + 'id' "Indonesian" \ + 'ie' "Interlingue" \ + 'il' "il" \ + 'in' "in" \ + 'iq' "iq" \ + 'ir' "ir" \ + 'is' "Icelandic" \ + 'it' "Italian" \ + 'jp' "Japanese" \ + 'ke' "ke" \ + 'kg' "Kongo" \ + 'kh' "kh" \ + 'kr' "Kanuri" \ + 'kz' "kz" \ + 'la' "Latin" \ + 'latam' "Latin-American" \ + 'lk' "lk" \ + 'lt' "Lithuanian" \ + 'lv' "Latvian" \ + 'ma' "ma" \ + 'mao' "Maori" \ + 'md' "md" \ + 'me' "me" \ + 'mk' "Macedonian" \ + 'ml' "Malayalam" \ + 'mm' "mm" \ + 'mn' "Mongolian" \ + 'mt' "Maltese" \ + 'mv' "mv" \ + 'my' "Burmese" \ + 'nec_vndr/jp' "nec_vndr/jp" \ + 'ng' "Ndonga" \ + 'nl' "Dutch" \ + 'no' "Norwegian" \ + 'np' "np" \ + 'ph' "ph" \ + 'pk' "pk" \ + 'pl' "Polish" \ + 'pt' "Portuguese" \ + 'ro' "Romanian" \ + 'rs' "rs" \ + 'ru' "Russian" \ + 'se' "Northern-Sami" \ + 'si' "Sinhala" \ + 'sk' "Slovak" \ + 'sn' "Shona" \ + 'sy' "sy" \ + 'tg' "Tajik" \ + 'th' "Thai" \ + 'tj' "tj" \ + 'tm' "tm" \ + 'tr' "Turkish" \ + 'tw' "Twi" \ + 'tz' "tz" \ + 'ua' "ua" \ + 'us' "English" \ + 'uz' "Uzbek" \ + 'vn' "vn" \ + 'za' "Zhuang" ) +readonly -a INSTALLER_DIRS=( './.install-openrc-lxde/packages' \ + './.install-systemd-mate/packages' ) + + +Prompt() # (title , prompt , default_option , options) +{ + declare -l title=$1 + declare -l prompt=$2 + declare -l default_option=$3 + declare -l options="${@:4}" + + dialog --backtitle "$title" --stdout --no-tags --no-cancel --timeout $TIMEOUT \ + --default-item $default_option --menu "$prompt" $H $W $N_ITEMS $options +} + + +## prompt for language if not already selected ## + +language=$(grep 'LANG=' /root/.codecheck | cut -d '=' -f 2) +if [ "${language// /}" == '_UNDEFINED_' ] +then language=$(Prompt "$LANG_TITLE" "$LANG_PROMPT" $LANG_DEFAULT "${LANGUAGES[@]}") + [ "${language}" == "" ] && language=$LANG_DEFAULT + logger "$0: selected language='$language'" + + # prepare locale + echo "LANG=${language}" > /etc/locale.conf + + # prepare language-specific install wizard + language=${language/_*/} +# for init_de in `ls -d /root/.install-* | sed 's|/root/\.install-\(.*\)|\1|'` +# do ls /root/.install-${init_de}/language/${language}/ &> /dev/null || language='en' +# cp -a /root/.install-${init_de}/language/${language}/* /root/.install-${init_de}/ +# done + + # include language-specific language packs in the install wizard package set +# for installer_dir in ${INSTALLER_DIRS[@]} +# do case ${language} in +# 'eo') echo "${ESPERANTO_LANG_PACKS[@]}" >> ${installer_dir}/packages ;; +# 'fr') echo "${FRENCH_LANG_PACKS[@]}" >> ${installer_dir}/packages ;; +# 'gl') echo "${GALEGO_LANG_PACKS[@]}" >> ${installer_dir}/packages ;; +# 'it') echo "${ITALIAN_LANG_PACKS[@]}" >> ${installer_dir}/packages ;; +# 'pl') echo "${POLISH_LANG_PACKS[@]}" >> ${installer_dir}/packages ;; +# 'pt') echo "${PORTUGUESE_LANG_PACKS[@]}" >> ${installer_dir}/packages ;; +# 'es') echo "${SPANISH_LANG_PACKS[@]}" >> ${installer_dir}/packages ;; +# esac +# done + + # confirm this selection + sed -i "s/^LANG=.*/LANG=${language}/" /root/.codecheck +fi + + +## prompt for X11 keymap if not already selected ## + +keymap=$(grep 'XKBMAP=' /root/.codecheck | cut -d '=' -f 2) +if [ "${keymap// /}" == '_UNDEFINED_' ] +then keymap=$(Prompt "$KEYMAP_TITLE" "$KEYMAP_PROMPT" $KEYMAP_DEFAULT "${KEYMAPS[@]}") + [ "${keymap}" == "" ] && keymap=$KEYMAP_DEFAULT + logger "$0: selected keymap='$keymap'" + + # set keymap + setxkbmap ${keymap} 2> /dev/null + + # confirm this selection + sed -i "s/^XKBMAP=.*/XKBMAP=${keymap}/" /root/.codecheck +fi + + +## prompt to launch installer or CLI ## + +# interface=$(Prompt "$INTERFACE_TITLE" "$INTERFACE_PROMPT" $INTERFACE_DEFAULT "${INTERFACES[@]}") +# [ "${interface}" == "" ] && interface=$INTERFACE_DEFAULT + +clear diff --git a/configs/profile/root-image/root/customize_root_image-constants.inc b/configs/profile/root-image/root/customize_root_image-constants.inc index f4d9fab..e06589d 100644 --- a/configs/profile/root-image/root/customize_root_image-constants.inc +++ b/configs/profile/root-image/root/customize_root_image-constants.inc @@ -76,8 +76,7 @@ else readonly INSTALL_TYPE='NetInstall' ; readonly NETWORK_MOTD_MSG=${NETINSTALL fi readonly ROOT_SKEL_FILES="/etc/skel/.bash_logout \ - /etc/skel/.bash_profile \ - /etc/skel/install.sh" + /etc/skel/.bash_profile" readonly MINI_SKEL_FILES="/etc/skel/.xinitrc" readonly LIVE_USER=parabola |