forked from infra/ansible
mirrormanager / mirrorlist_proxy: add explicit Host: to header in checks
In newer curl, not specifying Host: here means it emits a warning: Warning: The provided HTTP header 'mirrors.fedoraproject.org' does not look Warning: like a header? So, specify Host: for the header so it works on both old curl and new. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
parent
4908f3bea7
commit
5887d43751
1 changed files with 3 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ else
|
|||
fi
|
||||
|
||||
# check mirrorlist2 (old protbuf cache and see that it's processing ok)
|
||||
curl -q -H mirrors.fedoraproject.org ${mirrorlist2} -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 | grep "sha512" >/dev/null
|
||||
curl -q -H 'Host: mirrors.fedoraproject.org' ${mirrorlist2} -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 | grep "sha512" >/dev/null
|
||||
if [ $? != 0 ]; then
|
||||
echo "ERROR: mirrorlist2 not processing correctly"
|
||||
exit 1
|
||||
|
|
@ -72,7 +72,7 @@ check_and_restart mirrorlist1
|
|||
|
||||
|
||||
sleep ${TIME_RESTART}
|
||||
curl -q -H mirrors.fedoraproject.org ${mirrorlist1} -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 | grep "sha512" >/dev/null
|
||||
curl -q -H 'Host: mirrors.fedoraproject.org' ${mirrorlist1} -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 | grep "sha512" >/dev/null
|
||||
if [ $? != 0 ]; then
|
||||
echo "ERROR: mirrorlist1 did not restart correctly"
|
||||
exit 1
|
||||
|
|
@ -97,7 +97,7 @@ sleep 1
|
|||
check_and_restart mirrorlist2
|
||||
|
||||
sleep ${TIME_RESTART}
|
||||
curl -q -H mirrors.fedoraproject.org ${mirrorlist2} -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180
|
||||
curl -q -H 'Host: mirrors.fedoraproject.org' ${mirrorlist2} -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180
|
||||
if [ $? != 0 ]; then
|
||||
echo "ERROR: mirrorlist2 did not restart correctly"
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue