Change: Edited 'first_check' function so as to load the 'Select Fonts' stage only when the user is logged in as ROOT in the console (tty)

This commit is contained in:
Jane Doe 2024-09-22 14:35:16 +00:00
parent 6d65c6f030
commit eab21626e4

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Amelia Installer
# Version: 7.6
# Version: 7.6.1
set -euo pipefail
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
@ -348,20 +348,23 @@ failure() {
# FUNCTIONS
first_check() {
if [[ "${tty}" == *"tty"* && -f /usr/share/kbd/consolefonts/ter-v18b.psf.gz && -f /usr/share/kbd/consolefonts/ter-v32b.psf.gz ]]; then
until slct_font; do : ; done
elif [[ "${tty}" == *"pts"* && -f /usr/share/kbd/consolefonts/ter-v18b.psf.gz && -f /usr/share/kbd/consolefonts/ter-v32b.psf.gz ]]; then
MAGENTABG " 'Terminus Font' detected > Switch to console (tty) and re-run the installer to activate "
echo
if [[ -f /usr/share/kbd/consolefonts/ter-v18b.psf.gz && -f /usr/share/kbd/consolefonts/ter-v32b.psf.gz ]]; then
if [[ "${tty}" == *"tty"* && "${run_as}" == "root" ]]; then
until slct_font; do : ; done
else
MAGENTABG " 'Terminus Font' detected > Log In as 'ROOT' in console & re-run to enable "
echo
fi
fi
if [[ "${run_as}" == "root" ]]; then
REDBGBL " ${yellow}---------------------------------------- "
REDBGBL " ${yellow}### The Installer Runs In ROOT Mode ### "
REDBGBL " ${yellow}---------------------------------------- "
REDBG " ${yellow}---------------------------------------- "
REDBG " ${yellow}### The Installer Runs In ROOT Mode ### "
REDBG " ${yellow}---------------------------------------- "
else
YELLOWBGBL " ---------------------------------------- "
YELLOWBGBL " ### The Installer Runs In DEMO Mode ### "
YELLOWBGBL " ---------------------------------------- "
YELLOWBG " ---------------------------------------- "
YELLOWBG " ### The Installer Runs In DEMO Mode ### "
YELLOWBG " ---------------------------------------- "
fi
}
###################################################################################################