From cca7030daa30746c32c228246c83af3f31700bf1 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Thu, 4 May 2023 20:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=88=E7=94=A8=20axel=20=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=EF=BC=8C=E5=87=BA=E9=94=99=E5=86=8D=E7=94=A8=20curl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ks-trans.cfg | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ks-trans.cfg b/ks-trans.cfg index bc83259..9c9c4ca 100644 --- a/ks-trans.cfg +++ b/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'