Commit 18b775e4 authored by Timothy Redaelli's avatar Timothy Redaelli

Use updated worldwide mirrors from mirrorlist instead of hardcoding broken one

parent c164d4bb
......@@ -38,6 +38,17 @@ download() {
return 1
}
get_mirrors() {
if [ -n "$mirrors" ]; then
local m
for m in $mirrors; do
echo 'Server = '"$m"'/$repo/os/$arch'
done
else
_download 'https://www.archlinux.org/mirrorlist/?country=all&protocol=http&protocol=https&ip_version=4' | awk '/^## /{if ($2 == "Worldwide") { flag=1 } else { flag=0 } } { if (flag) print }' | sed 's/^#Server/Server/'
fi
}
download_and_extract_bootstrap() {
local sha1 filename
download iso/latest/sha1sums.txt | fgrep "$cpu_type.tar.gz" > "sha1sums.txt"
......@@ -72,10 +83,7 @@ chroot_exec() {
}
configure_chroot() {
local m
for m in $mirrors; do
echo 'Server = '"$m"'/$repo/os/$arch'
done >> "/root.$cpu_type/etc/pacman.d/mirrorlist"
get_mirrors >> "/root.$cpu_type/etc/pacman.d/mirrorlist"
# Install and initialize haveged if needed
if ! is_openvz && ! pidof haveged >/dev/null; then
# Disable signature check, install and launch haveged and re-enable signature checks.
......@@ -321,8 +329,6 @@ while getopts ":b:m:n:h" opt; do
done
shift $((OPTIND - 1))
: ${mirrors:="http://mirror.rackspace.com/archlinux http://dgix.ru/mirrors/archlinux"}
if is_openvz; then
bootloader=none
network=netctl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment