mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
fix: Display reason for network failure (#738)
This commit is contained in:
parent
2ec37e2802
commit
1f1007a0f1
@ -149,6 +149,8 @@ if [ ! -s "$RDC" ]; then
|
|||||||
|
|
||||||
fKill "progress.sh"
|
fKill "progress.sh"
|
||||||
|
|
||||||
|
(( rc == 4 )) && error "Failed to download $LOC , network failure!" && exit 60
|
||||||
|
|
||||||
if (( rc != 0 )); then
|
if (( rc != 0 )); then
|
||||||
if (( rc != 22 )) && (( rc != 56 )); then
|
if (( rc != 22 )) && (( rc != 56 )); then
|
||||||
error "Failed to download $LOC, reason: $rc" && exit 60
|
error "Failed to download $LOC, reason: $rc" && exit 60
|
||||||
@ -171,6 +173,7 @@ if [ ! -s "$RDC" ]; then
|
|||||||
{ wget "$LOC" -O "$PAT" -q --no-check-certificate --timeout=10 --show-progress "$PROGRESS"; rc=$?; } || :
|
{ wget "$LOC" -O "$PAT" -q --no-check-certificate --timeout=10 --show-progress "$PROGRESS"; rc=$?; } || :
|
||||||
|
|
||||||
fKill "progress.sh"
|
fKill "progress.sh"
|
||||||
|
(( rc == 4 )) && error "Failed to download $LOC , network failure!" && exit 60
|
||||||
(( rc != 0 )) && error "Failed to download $LOC , reason: $rc" && exit 60
|
(( rc != 0 )) && error "Failed to download $LOC , reason: $rc" && exit 60
|
||||||
|
|
||||||
tar --extract --file="$PAT" --directory="$(dirname "$RD")"/. "$(basename "$RD")"
|
tar --extract --file="$PAT" --directory="$(dirname "$RD")"/. "$(basename "$RD")"
|
||||||
@ -245,6 +248,7 @@ else
|
|||||||
{ wget "$URL" -O "$PAT" -q --no-check-certificate --timeout=10 --show-progress "$PROGRESS"; rc=$?; } || :
|
{ wget "$URL" -O "$PAT" -q --no-check-certificate --timeout=10 --show-progress "$PROGRESS"; rc=$?; } || :
|
||||||
|
|
||||||
fKill "progress.sh"
|
fKill "progress.sh"
|
||||||
|
(( rc == 4 )) && error "Failed to download $URL , network failure!" && exit 69
|
||||||
(( rc != 0 )) && error "Failed to download $URL , reason: $rc" && exit 69
|
(( rc != 0 )) && error "Failed to download $URL , reason: $rc" && exit 69
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user