From e12febac0a2f8b3533c45b867026b286d96a2039 Mon Sep 17 00:00:00 2001
From: Daniil Baturin <daniil@baturin.org>
Date: Sat, 18 Jan 2014 01:25:11 +0100
Subject: Bug #98: add an option for redirect support to curl call.

---
 scripts/install/install-image | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'scripts/install/install-image')

diff --git a/scripts/install/install-image b/scripts/install/install-image
index 3d668d21..f1f64dc2 100755
--- a/scripts/install/install-image
+++ b/scripts/install/install-image
@@ -66,7 +66,7 @@ fetch_iso_by_url ()
     vyos_version=`dpkg-query --showformat='${Version}' --show vyatta-version`
 
     filename="${TEMP_DIR}/${NEW_ISO##*/}"
-    curl -H "User-Agent: VyOS/$vyos_version" $auth -f -o $filename $NEW_ISO
+    curl -L -H "User-Agent: VyOS/$vyos_version" $auth -f -o $filename $NEW_ISO
     curlerror=$?
     if [ $curlerror -eq 51 ]; then
 	host=${NEW_ISO##scp://}
@@ -102,7 +102,7 @@ fetch_iso_by_url ()
     echo "ISO download succeeded."
 
     echo "Checking for digital signature file..."
-    curl -H "User-Agent: VyOS/$vyos_version" $auth -f -o ${filename}.asc ${NEW_ISO}.asc
+    curl -L -H "User-Agent: VyOS/$vyos_version" $auth -f -o ${filename}.asc ${NEW_ISO}.asc
     if [ $? -ne 0 ]; then
 	echo "Unable to fetch digital signature file."
 	echo -n "Do you want to continue without signature check? (yes/no) [yes] "
-- 
cgit v1.2.3