Merge remote-tracking branch 'origin/merge-requests/386'

By Dariusz Pelowski
* origin/merge-requests/386:
  .automated_script.sh: add proper HTTP status checking

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/386
This commit is contained in:
nl6720 2024-06-05 11:43:18 +03:00
commit 57589df1d6
No known key found for this signature in database
GPG key ID: 6B5387E670A955AD
2 changed files with 3 additions and 1 deletions

View file

@ -17,6 +17,8 @@ Deprecated
Fixed Fixed
----- -----
- When downloading an automation script fail with non-zero status code instead of returning an HTML document when the remote HTTP server fails to deliver the document.
Removed Removed
------- -------

View file

@ -23,7 +23,7 @@ automated_script() {
sleep 1 sleep 1
done done
printf '%s: downloading %s\n' "$0" "${script}" printf '%s: downloading %s\n' "$0" "${script}"
curl "${script}" --location --retry-connrefused --retry 10 -s -o /tmp/startup_script curl "${script}" --location --retry-connrefused --retry 10 --fail -s -o /tmp/startup_script
rt=$? rt=$?
else else
cp "${script}" /tmp/startup_script cp "${script}" /tmp/startup_script