From f9da3f5d82db01f6eecca7773e8a5863237d7646 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Mon, 5 Dec 2011 17:44:41 -0800 Subject: Add HTTP headers to identify client and version. --- scripts/install/install-image | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts') 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] " -- cgit v1.2.3