mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
先用 axel 下载,出错再用 curl
This commit is contained in:
parent
d7494b20f2
commit
cca7030daa
28
ks-trans.cfg
28
ks-trans.cfg
@ -5,10 +5,19 @@ rescue --nomount
|
||||
exec >/dev/pts/0 2>&1
|
||||
|
||||
download() {
|
||||
if command -v axel; then
|
||||
[ -z $2 ] && save="" || save="-o $2"
|
||||
axel $1 $save
|
||||
else
|
||||
# axel 有问题
|
||||
# axel "https://rocky-linux-us-south1.production.gcp.mirrors.ctrliq.cloud/pub/rocky//8.7/BaseOS/aarch64/os/images/pxeboot/vmlinuz"
|
||||
# Initializing download: https://rocky-linux-us-south1.production.gcp.mirrors.ctrliq.cloud/pub/rocky//8.7/BaseOS/aarch64/os/images/pxeboot/vmlinuz
|
||||
# Connection gone.
|
||||
|
||||
# axel https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.229-1/virtio-win-0.1.229.iso
|
||||
# Initializing download: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.229-1/virtio-win-0.1.229.iso
|
||||
# Too many redirects.
|
||||
|
||||
# 先用 axel 下载
|
||||
[ -z $2 ] && save="" || save="-o $2"
|
||||
if ! axel $1 $save; then
|
||||
# 出错再用 curl
|
||||
[ -z $2 ] && save="-O" || save="-o $2"
|
||||
curl -L $1 $save
|
||||
fi
|
||||
@ -96,16 +105,7 @@ else
|
||||
fi
|
||||
|
||||
# 安装 axel
|
||||
# rpm -i --nodeps https://mirrors.aliyun.com/epel/7/$basearch/Packages/a/axel-2.4-9.el7.$basearch.rpm
|
||||
|
||||
# axel 有问题
|
||||
# axel "https://rocky-linux-us-south1.production.gcp.mirrors.ctrliq.cloud/pub/rocky//8.7/BaseOS/aarch64/os/images/pxeboot/vmlinuz"
|
||||
# Initializing download: https://rocky-linux-us-south1.production.gcp.mirrors.ctrliq.cloud/pub/rocky//8.7/BaseOS/aarch64/os/images/pxeboot/vmlinuz
|
||||
# Connection gone.
|
||||
|
||||
# axel https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.229-1/virtio-win-0.1.229.iso
|
||||
# Initializing download: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.229-1/virtio-win-0.1.229.iso
|
||||
# Too many redirects.
|
||||
rpm -i --nodeps https://mirrors.aliyun.com/epel/7/$basearch/Packages/a/axel-2.4-9.el7.$basearch.rpm
|
||||
|
||||
if [ -d /sys/firmware/efi ] && [ "$basearch" = "x86_64" ]; then
|
||||
action='efi'
|
||||
|
Loading…
x
Reference in New Issue
Block a user