From f0b4b9058a1631bf2fb4c3d24a3b9dce04acfc7e Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 17 Mar 2020 12:13:51 +0100 Subject: Start from Scratch for a Rewrite --- archinstall.sh | 67 ++++++++++++++-------------------------------------------- 1 file changed, 16 insertions(+), 51 deletions(-) (limited to 'archinstall.sh') diff --git a/archinstall.sh b/archinstall.sh index 2dfbf9e..47afe7c 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -28,20 +28,9 @@ ################################################################# -# Settings +# Stop at any error to optimize debugging: -export TESTSERVER="archlinux.org" # IP or hostname -export NETWORK_DEADLINE=1 # in seconds -export REPOSITORY_URL="https://github.com/xengineering/archinstall/" # remote -export REPOSITORY_PATH="/opt/archinstall" # local -export BRANCH_OR_COMMIT="master" # select another branch or commit hash for checkout if needed -export LOG_FILE_PATH="/var/log/archinstall.log" - - -# PATH expansion - -export PATH=$PATH:$REPOSITORY_PATH/stages -export PATH=$PATH:$REPOSITORY_PATH/util +set -e # Greetings @@ -63,45 +52,21 @@ cat << EOF EOF -# Check internet connection - -if ping -w $NETWORK_DEADLINE -c 1 $TESTSERVER; then - echo "Internet connection is ready - OK" - echo "" -else - echo "Could not reach testserver '$TESTSERVER' - FAILED" - exit -fi - - -# Update the system clock - -timedatectl set-ntp true -if [ $? -eq 0 ]; then - echo "Updated system clock - OK" - echo "" -else - echo "Could not update system clock - FAILED" - exit -fi - - -# Cloning Git repository - -echo "Cloning git repository ..." -echo "" - -pacman --noconfirm -Sy git -mkdir $REPOSITORY_PATH -git clone $REPOSITORY_URL $REPOSITORY_PATH -cd $REPOSITORY_PATH -git checkout $BRANCH_OR_COMMIT -cd +# Constants -echo "Git repository cloned - OK" -echo "" +export INTERNET_TEST_SERVER="archlinux.org" +export INTERNET_TEST_PING_TIMEOUT=1 # seconds +export FIRST_STAGE_LINK="" +export SECOND_STAGE_LINK="" +export PACKAGE_LIST="base linux linux-firmware nano networkmanager" +export DEFAULT_PASSWORD="archinstall" -# Launching first stage +# Variables -bash first_stage.sh | tee -a $LOG_FILE_PATH +export boot_mode="unknown" # alternatives: "bios" or "uefi" +export luks_encryption="unknown" # alternatives: "yes" or "no" +export path_to_timezone="/usr/share/zoneinfo/Europe/Berlin" +export locales_to_generate="de_DE.UTF-8 UTF-8;de_DE ISO-8859-1;de_DE@euro ISO-8859-15" +export keymap="de-latin1" +export hostname="archlinux" # will be set to a user-chosen hostname -- cgit v1.2.3-70-g09d2