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
fi
title basic installations
echo "basic installations"
install_pkg networkmanager dhclient reflector \
rsync arch-install-scripts \
git pacman-contrib curl
@ -127,7 +127,7 @@ esac
echo "Installing 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
"GenuineIntel")

View File

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

View File

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