Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coreos-installer: Honor redirects via curl #28

Merged
merged 1 commit into from May 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions coreos-installer
Expand Up @@ -361,7 +361,7 @@ get_img_url() {
fi

IMAGE_URL=$(cat /tmp/image_url)
curl -sIf $IMAGE_URL >/tmp/image_info 2>&1
curl -LsIf $IMAGE_URL >/tmp/image_info 2>&1
RETCODE=$?
if [ $RETCODE -ne 0 ]
then
Expand Down Expand Up @@ -391,14 +391,14 @@ get_img_url() {
get_sig_file_type() {
SIG_URL=$IMAGE_URL.sig
echo "Getting SIG_URL $SIG_URL" >> /tmp/debug
curl -sIf $SIG_URL > /dev/null 2>&1
curl -LsIf $SIG_URL > /dev/null 2>&1
RETCODE=$?
if [ $RETCODE -ne 0 ]
then
echo "$SIG_URL not found" >> /tmp/debug
SIG_URL=$IMAGE_URL.sha256sum
echo "Getting SIG_URL $SIG_URL" >> /tmp/debug
curl -sI $SIG_URL > /dev/null 2>&1
curl -LsI $SIG_URL > /dev/null 2>&1
if [ $? -ne 0 ]
then
SIG_TYPE=none
Expand Down Expand Up @@ -498,7 +498,7 @@ mount_tmpfs() {
#########################################################
download_image() {
echo "Downloading install image" >> /tmp/debug
curl -s -o /mnt/dl/imagefile.gz $IMAGE_URL &
curl -L -s -o /mnt/dl/imagefile.gz $IMAGE_URL &
curlpid=$!

while ps --pid $curlpid; do
Expand All @@ -519,7 +519,7 @@ download_image() {
#########################################################
download_sig() {
echo "Getting signature" >> /tmp/debug
curl -s -o /mnt/dl/imagefile.gz.sig $SIG_URL
curl -L -s -o /mnt/dl/imagefile.gz.sig $SIG_URL
if [ $? -ne 0 ]
then
dialog --title 'CoreOS Installer' --msgbox "Unable to download sig file. Dropping to shell" 10 70
Expand Down