From fe6e9fbb7b70237b95199a7ed58656840a20dcc0 Mon Sep 17 00:00:00 2001 From: Jeevitha Kannan K S Date: Sun, 23 Feb 2025 22:30:56 +0530 Subject: [PATCH] fix: reflector returning mirrors that are down Add --score 5 to return mirrors that have score less than 5 making sure that most of the returned mirrors are active --- core/tabs/system-setup/arch/server-setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/tabs/system-setup/arch/server-setup.sh b/core/tabs/system-setup/arch/server-setup.sh index 913d5f61..3086db14 100755 --- a/core/tabs/system-setup/arch/server-setup.sh +++ b/core/tabs/system-setup/arch/server-setup.sh @@ -316,7 +316,11 @@ echo -ne " Setting up $iso mirrors for faster downloads ------------------------------------------------------------------------- " -reflector -a 48 -c "$iso" -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist +reflector -a 48 -c "$iso" --score 5 -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist +if [[ $(grep -c "Server =" /etc/pacman.d/mirrorlist) -lt 5 ]]; then #check if there are less than 5 mirrors + cp /etc/pacman.d/mirrorlist.bak /etc/pacman.d/mirrorlist +fi + if [ ! -d "/mnt" ]; then mkdir /mnt fi