mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2025-03-03 13:27:12 +00:00
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
This commit is contained in:
parent
232b45e6a6
commit
fe6e9fbb7b
|
@ -316,7 +316,11 @@ echo -ne "
|
||||||
Setting up $iso mirrors for faster downloads
|
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
|
if [ ! -d "/mnt" ]; then
|
||||||
mkdir /mnt
|
mkdir /mnt
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user