mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-31 19:08:07 +08:00
先用 axel 下载,出错再用 curl
This commit is contained in:
parent
d7494b20f2
commit
cca7030daa
26
ks-trans.cfg
26
ks-trans.cfg
@ -5,10 +5,19 @@ rescue --nomount
|
|||||||
exec >/dev/pts/0 2>&1
|
exec >/dev/pts/0 2>&1
|
||||||
|
|
||||||
download() {
|
download() {
|
||||||
if command -v axel; then
|
# 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"
|
[ -z $2 ] && save="" || save="-o $2"
|
||||||
axel $1 $save
|
if ! axel $1 $save; then
|
||||||
else
|
# 出错再用 curl
|
||||||
[ -z $2 ] && save="-O" || save="-o $2"
|
[ -z $2 ] && save="-O" || save="-o $2"
|
||||||
curl -L $1 $save
|
curl -L $1 $save
|
||||||
fi
|
fi
|
||||||
@ -96,16 +105,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# 安装 axel
|
# 安装 axel
|
||||||
# rpm -i --nodeps https://mirrors.aliyun.com/epel/7/$basearch/Packages/a/axel-2.4-9.el7.$basearch.rpm
|
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.
|
|
||||||
|
|
||||||
if [ -d /sys/firmware/efi ] && [ "$basearch" = "x86_64" ]; then
|
if [ -d /sys/firmware/efi ] && [ "$basearch" = "x86_64" ]; then
|
||||||
action='efi'
|
action='efi'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user