This commit is contained in:
mfgbhatti 2022-02-19 14:56:12 +00:00
parent 8e4a592db1
commit 2c1397053c
3 changed files with 21 additions and 16 deletions

View File

@ -11,7 +11,7 @@ else
exit 1 exit 1
fi fi
title basic installations echo "basic installations"
install_pkg networkmanager dhclient reflector \ install_pkg networkmanager dhclient reflector \
rsync arch-install-scripts \ rsync arch-install-scripts \
git pacman-contrib curl git pacman-contrib curl
@ -127,7 +127,7 @@ esac
echo "Installing Microcode" echo "Installing Microcode"
# determine processor type and install microcode # determine processor type and install microcode
PROC_TYPE="$(lscpu | grep "Vendor ID:" | awk '{print $3}')" PROC_TYPE="$(lscpu | grep "Vendor ID:" | awk '{print $3}' | head -1)"
case "$PROC_TYPE" in case "$PROC_TYPE" in
"GenuineIntel") "GenuineIntel")

View File

@ -45,10 +45,15 @@ end() {
if [[ "$KEY" == $'\e' ]]; then if [[ "$KEY" == $'\e' ]]; then
break break
elif [[ "$KEY" == "r" || "$KEY" == "R" ]]; then elif [[ "$KEY" == "r" || "$KEY" == "R" ]]; then
do_reboot REBOOT=1
break break
fi fi
done done
if [[ "$REBOOT" -eq 1 ]]; then
do_reboot
else
echo "Aborted"
fi
} }
sequence() { sequence() {

View File

@ -23,24 +23,24 @@ set_option() {
check_root() { check_root() {
if [[ "$(id -u)" != "0" ]]; then if [[ "$(id -u)" != "0" ]]; then
echo -ne "ERROR! This script must be running under the 'root' user!\n" echo -ne "ERROR! This script must be running under the 'root' user!\n"
exit 1 exit 0
fi fi
} }
check_docker() { check_docker() {
if awk -F/ '$2 == "docker"' /proc/self/cgroup | read -r; then if awk -F/ '$2 == "docker"' /proc/self/cgroup | read -r; then
echo -ne "ERROR! Docker container not supported (at the moment)\n" echo -ne "ERROR! Docker container not supported (at the moment)\n"
exit 1 exit 0
elif [[ -f /.dockerenv ]]; then elif [[ -f /.dockerenv ]]; then
echo -ne "ERROR! Docker container not supported (at the moment)\n" echo -ne "ERROR! Docker container not supported (at the moment)\n"
exit 1 exit 0
fi fi
} }
check_arch() { check_arch() {
if [[ ! -e /etc/arch-release ]]; then if [[ ! -e /etc/arch-release ]]; then
echo -ne "ERROR! This script must be run in Arch Linux!\n" echo -ne "ERROR! This script must be run in Arch Linux!\n"
exit 1 exit 0
fi fi
} }
@ -48,7 +48,7 @@ check_pacman() {
if [[ -f /var/lib/pacman/db.lck ]]; then if [[ -f /var/lib/pacman/db.lck ]]; then
echo "ERROR! Pacman is blocked." echo "ERROR! Pacman is blocked."
echo -ne "If not running remove /var/lib/pacman/db.lck.\n" echo -ne "If not running remove /var/lib/pacman/db.lck.\n"
exit 1 exit 0
fi fi
} }
@ -192,7 +192,7 @@ refresh_pacman() {
something_failed() { something_failed() {
echo "ERROR! Something is not right. Exiting.\n" echo "ERROR! Something is not right. Exiting.\n"
exit 1 exit 0
} }
logo () { logo () {
@ -231,16 +231,16 @@ logo() {
} }
background_check() { background_check() {
write_to_config check_root
if connection_test; then check_docker
echo -ne "ERROR! There seems to be no internet connection.\n"
exit 1
fi
check_arch check_arch
check_pacman check_pacman
check_docker write_to_config
efi_check efi_check
check_root if connection_test; then
echo -ne "ERROR! There seems to be no internet connection.\n"
exit 0
fi
set_ntp set_ntp
do_curl do_curl
} }