diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2011-12-05 17:44:41 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2011-12-05 17:44:41 -0800 |
commit | f9da3f5d82db01f6eecca7773e8a5863237d7646 (patch) | |
tree | ee6dbb022b81cdb7d6f66c73657b5920034c6af5 /scripts | |
parent | 94bf99b056a4e2a83994e2b803d7140c972f2d11 (diff) | |
download | vyatta-cfg-system-f9da3f5d82db01f6eecca7773e8a5863237d7646.tar.gz vyatta-cfg-system-f9da3f5d82db01f6eecca7773e8a5863237d7646.zip |
Add HTTP headers to identify client and version.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install/install-image | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/install/install-image b/scripts/install/install-image index 5abef7ca..ea8cfd7f 100755 --- a/scripts/install/install-image +++ b/scripts/install/install-image @@ -62,8 +62,12 @@ fetch_iso_by_url () auth="" fi + client_hdr="-H vyatta-client: install-image" + vyatta_version=`dpkg-query --showformat='${Version}' --show vyatta-version` + vers_hdr="-H vyatta-version: $vyatta_version" + filename="${TEMP_DIR}/${NEW_ISO##*/}" - curl $auth -f -o $filename $NEW_ISO + curl "$client_hdr" "$vers_hdr" $auth -f -o $filename $NEW_ISO if [ $? -ne 0 ]; then echo "Unable to fetch ISO from $NEW_ISO" rm -f $filename @@ -78,7 +82,7 @@ fetch_iso_by_url () echo "ISO download suceeded." echo "Checking for digital signature file..." - curl -f -o ${filename}.asc ${NEW_ISO}.asc + curl "$client_hdr" "$vers_hdr" -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] " |