From 430b6099046f6a2cfb09caf14c1e8e47ec9d0cfc Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 21 Mar 2020 15:51:22 +0100 Subject: Implement Optimization of mirrorlist --- archinstall.sh | 1 + stages/first_stage.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/archinstall.sh b/archinstall.sh index 732fdd6..4ce3687 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -62,6 +62,7 @@ EOF export path_to_disk="/dev/sda" # select the disk for installation like "/dev/sda" export hostname="archlinux" # select the hostname for your installation +export pacman_mirror_region="DE" # select "all" for all regions export luks_encryption="no" # "yes" for full disk encryption, "no" for normal installation export path_to_timezone="/usr/share/zoneinfo/Europe/Berlin" # choose your timezone export locales_to_generate="de_DE.UTF-8 UTF-8" # currently just one option diff --git a/stages/first_stage.sh b/stages/first_stage.sh index 302192b..85b1119 100644 --- a/stages/first_stage.sh +++ b/stages/first_stage.sh @@ -184,6 +184,12 @@ fi print_ok "Formatting done" +# optimize mirrorlist + +print_ok "Optimize pacman mirrorlist ..." +curl "https://www.archlinux.org/mirrorlist/?country=$pacman_mirror_region&protocol=http&protocol=https&ip_version=4" > /etc/pacman.d/mirrorlist +sed -i '/#Server = *./s/^#//g' /etc/pacman.d/mirrorlist + # install packages with pacstrap pacstrap /mnt $PACKAGE_LIST -- cgit v1.2.3-70-g09d2