From 0abcd9ea3008c0a03d2606a76dd02f1e0d4cb558 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Wed, 1 Jan 2025 17:38:30 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=20?= =?UTF-8?q?url=20403=20=E6=97=B6=E6=B2=A1=E6=9C=89=E5=8F=8A=E6=97=B6?= =?UTF-8?q?=E4=B8=AD=E6=96=AD=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index 7eb06d2..1f9bca4 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -286,9 +286,23 @@ test_url_real() { ret=$? msg="$url not accessible" case $ret in - 22) failed "$msg" ;; # 403 404 - 23) break ;; # 限制了空间 - *) [ $i -eq 0 ] && failed "$msg" ;; # 其他错误 + 22) + # 403 404 + # 这里的 failed 虽然返回 1,但是不会中断脚本,因此要手动 return + failed "$msg" + return "$ret" + ;; + 23) + # 限制了空间 + break + ;; + *) + # 其他错误 + if [ $i -eq 0 ]; then + failed "$msg" + return "$ret" + fi + ;; esac sleep 1 fi