From 2c1397053c8f72a8b7673a5a7aa105932a354f71 Mon Sep 17 00:00:00 2001 From: mfgbhatti Date: Sat, 19 Feb 2022 14:56:12 +0000 Subject: [PATCH] QEMU bug --- 1-setup.sh | 4 ++-- archtitus.sh | 7 ++++++- startup.sh | 26 +++++++++++++------------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/1-setup.sh b/1-setup.sh index 4f43e63..3ddf2c2 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -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") diff --git a/archtitus.sh b/archtitus.sh index af63ee2..24907c4 100755 --- a/archtitus.sh +++ b/archtitus.sh @@ -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() { diff --git a/startup.sh b/startup.sh index d18fd98..1e7c90b 100644 --- a/startup.sh +++ b/startup.sh @@ -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 }