mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
core: 修复测试 url 403 时没有及时中断脚本
This commit is contained in:
parent
ea4af1f18d
commit
0abcd9ea30
20
reinstall.sh
20
reinstall.sh
@ -286,9 +286,23 @@ test_url_real() {
|
|||||||
ret=$?
|
ret=$?
|
||||||
msg="$url not accessible"
|
msg="$url not accessible"
|
||||||
case $ret in
|
case $ret in
|
||||||
22) failed "$msg" ;; # 403 404
|
22)
|
||||||
23) break ;; # 限制了空间
|
# 403 404
|
||||||
*) [ $i -eq 0 ] && failed "$msg" ;; # 其他错误
|
# 这里的 failed 虽然返回 1,但是不会中断脚本,因此要手动 return
|
||||||
|
failed "$msg"
|
||||||
|
return "$ret"
|
||||||
|
;;
|
||||||
|
23)
|
||||||
|
# 限制了空间
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# 其他错误
|
||||||
|
if [ $i -eq 0 ]; then
|
||||||
|
failed "$msg"
|
||||||
|
return "$ret"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
sleep 1
|
sleep 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user