Get mirrors from https://www.archlinux.org/mirrorlist/ when not specified (#24)
This commit is contained in:
parent
c164d4bb41
commit
867d5c846a
1 changed files with 5 additions and 1 deletions
6
vps2arch
6
vps2arch
|
@ -25,6 +25,10 @@ else
|
|||
exit 2
|
||||
fi
|
||||
|
||||
get_worldwide_mirrors() {
|
||||
_download 'https://www.archlinux.org/mirrorlist/?country=all&protocol=http&protocol=https&ip_version=4' | awk '/^## /{if ($2 == "Worldwide") { flag=1 } else { flag=0 } } /^#Server/ { if (flag) { sub(/\/\$repo.*/, ""); print $3 } }'
|
||||
}
|
||||
|
||||
cpu_type=$(uname -m)
|
||||
|
||||
is_openvz() { [ -d /proc/vz -a ! -d /proc/bc ]; }
|
||||
|
@ -321,7 +325,7 @@ while getopts ":b:m:n:h" opt; do
|
|||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
: ${mirrors:="http://mirror.rackspace.com/archlinux http://dgix.ru/mirrors/archlinux"}
|
||||
[ -z "$mirrors" ] && mirrors=$(get_worldwide_mirrors)
|
||||
|
||||
if is_openvz; then
|
||||
bootloader=none
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue