mirror of
https://gitlab.com/prism7/archery.git
synced 2026-04-28 09:27:35 +02:00
Add: The installer now checks for bad username and wll not continue unless a valid username has been set.
Change: A few prompts have been edited/added for better aesthetics. Change: User input at the 'Multiboot Status' stage now defaults to lowercase. Change: Minor code changes for simplification.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Amelia Installer
|
# Amelia Installer
|
||||||
# Source: https://gitlab.com/prism7/archery
|
# Source: https://gitlab.com/prism7/archery
|
||||||
# Version: 9.7.0
|
# Version: 9.7.1
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
@@ -690,7 +690,7 @@ Enter a number: "
|
|||||||
###################################################################################################
|
###################################################################################################
|
||||||
slct_locale() {
|
slct_locale() {
|
||||||
|
|
||||||
local prompt="Locale"
|
local prompt="Locale Selection"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
NC "
|
NC "
|
||||||
|
|
||||||
@@ -744,7 +744,7 @@ Enter your Locale ${bwhite}(empty for 'en_US')${blue}: "
|
|||||||
###################################################################################################
|
###################################################################################################
|
||||||
slct_kbd() {
|
slct_kbd() {
|
||||||
|
|
||||||
local prompt="Keyboard Layout"
|
local prompt="Keyboard Layout Selection"
|
||||||
local stage_prompt="Setting Keyboard Layout"
|
local stage_prompt="Setting Keyboard Layout"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
NC "
|
NC "
|
||||||
@@ -808,7 +808,7 @@ Enter your keyboard layout ${bwhite}(empty for 'us')${blue}: "
|
|||||||
###################################################################################################
|
###################################################################################################
|
||||||
user_setup() {
|
user_setup() {
|
||||||
|
|
||||||
local prompt="User"
|
local prompt="User Setup"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
NC "
|
NC "
|
||||||
|
|
||||||
@@ -832,7 +832,7 @@ Enter a username: "
|
|||||||
---------------------------------------------"
|
---------------------------------------------"
|
||||||
reload
|
reload
|
||||||
return 1
|
return 1
|
||||||
fi
|
elif [[ "${USERNAME}" =~ ^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$ ]]; then
|
||||||
|
|
||||||
BLUE "
|
BLUE "
|
||||||
Enter a password for${nc} ${cyan}${USERNAME}${blue}: "
|
Enter a password for${nc} ${cyan}${USERNAME}${blue}: "
|
||||||
@@ -865,12 +865,21 @@ Re-enter${nc} ${cyan}${USERNAME}'s ${blue}password: "
|
|||||||
reload
|
reload
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
sleep 0.2
|
||||||
|
RED "
|
||||||
|
---------------------------------------------------
|
||||||
|
### ${yellow}Please enter a valid username to continue ${red}###
|
||||||
|
---------------------------------------------------"
|
||||||
|
reload
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
ok
|
ok
|
||||||
}
|
}
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
rootuser_setup() {
|
rootuser_setup() {
|
||||||
|
|
||||||
local prompt="Root User"
|
local prompt="Root User Setup"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
NC "
|
NC "
|
||||||
|
|
||||||
@@ -914,7 +923,7 @@ Re-enter${nc} ${cyan}Root ${blue}user's password: "
|
|||||||
###################################################################################################
|
###################################################################################################
|
||||||
slct_hostname() {
|
slct_hostname() {
|
||||||
|
|
||||||
local prompt="Hostname"
|
local prompt="Hostname Setup"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
NC "
|
NC "
|
||||||
|
|
||||||
@@ -950,7 +959,7 @@ Enter a hostname: "
|
|||||||
###################################################################################################
|
###################################################################################################
|
||||||
slct_shell() {
|
slct_shell() {
|
||||||
|
|
||||||
local prompt="Shell"
|
local prompt="Shell Selection"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
NC "
|
NC "
|
||||||
|
|
||||||
@@ -3468,7 +3477,6 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Multi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### If ${nc}'(y)es'${yellow} then: "
|
### If ${nc}'(y)es'${yellow} then: "
|
||||||
CYAN "
|
CYAN "
|
||||||
|
|
||||||
@@ -3486,6 +3494,8 @@ Enter [y/n]: "
|
|||||||
read -r -p "
|
read -r -p "
|
||||||
==> " multibooting
|
==> " multibooting
|
||||||
|
|
||||||
|
multibooting="${multibooting,,}"
|
||||||
|
|
||||||
case "${multibooting}" in
|
case "${multibooting}" in
|
||||||
y)
|
y)
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
@@ -3647,7 +3657,6 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: "
|
|||||||
until manual_presets; do : ; done
|
until manual_presets; do : ; done
|
||||||
until set_partsize; do : ; done
|
until set_partsize; do : ; done
|
||||||
until partitioner; do : ; done
|
until partitioner; do : ; done
|
||||||
return 0
|
|
||||||
else
|
else
|
||||||
invalid
|
invalid
|
||||||
return 1
|
return 1
|
||||||
@@ -3854,10 +3863,8 @@ partitioner() {
|
|||||||
if [[ "${install}" == "yes" ]]; then
|
if [[ "${install}" == "yes" ]]; then
|
||||||
until sanity_check; do : ; done
|
until sanity_check; do : ; done
|
||||||
else
|
else
|
||||||
if [[ -n "${preset}" ]]; then
|
|
||||||
ok
|
ok
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
manual_part() {
|
manual_part() {
|
||||||
@@ -3968,6 +3975,7 @@ Enter a disk number: "
|
|||||||
-----------------------------------"
|
-----------------------------------"
|
||||||
reload
|
reload
|
||||||
until main_menu; do : ; done
|
until main_menu; do : ; done
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
volumes="$(fdisk -l | grep '^/dev' | cat --number)"
|
volumes="$(fdisk -l | grep '^/dev' | cat --number)"
|
||||||
rota="$(lsblk "${instl_drive}" --nodeps --noheadings --output=rota | awk "{print \$1}")"
|
rota="$(lsblk "${instl_drive}" --nodeps --noheadings --output=rota | awk "{print \$1}")"
|
||||||
@@ -4002,6 +4010,7 @@ Enter a disk number: "
|
|||||||
until ask_multibooting; do : ; done
|
until ask_multibooting; do : ; done
|
||||||
fi
|
fi
|
||||||
until sanity_check; do : ; done
|
until sanity_check; do : ; done
|
||||||
|
return 0
|
||||||
else
|
else
|
||||||
invalid
|
invalid
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user