summaryrefslogtreecommitdiffstats
path: root/tools/yardstick-img-lxd-modify
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-03-21 01:56:13 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-21 01:56:13 +0000
commitc151f02d0f66b81e6408503b5a4a4737c5f46276 (patch)
tree9dde0b672a20cb6e160d73b26fc83a1b5a384ae4 /tools/yardstick-img-lxd-modify
parent1b73cc1efeae88739b4423caf563e3b7574a1804 (diff)
parentd5ec83c114598b03d60c6efaa17790902521c3a6 (diff)
Merge "Bugfix: replace MD5SUM with SHA256SUMs" into stable/danube
Diffstat (limited to 'tools/yardstick-img-lxd-modify')
-rwxr-xr-xtools/yardstick-img-lxd-modify12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/yardstick-img-lxd-modify b/tools/yardstick-img-lxd-modify
index 4ca4eb489..b977d2a52 100755
--- a/tools/yardstick-img-lxd-modify
+++ b/tools/yardstick-img-lxd-modify
@@ -44,8 +44,8 @@ host=${HOST:-"cloud-images.ubuntu.com"}
release=${RELEASE:-"xenial"}
image_path="${release}/current/${release}-server-cloudimg-amd64-root.tar.gz"
image_url=${IMAGE_URL:-"https://${host}/${image_path}"}
-md5sums_path="${release}/current/MD5SUMS"
-md5sums_url=${MD5SUMS_URL:-"https://${host}/${md5sums_path}"}
+sha256sums_path="${release}/current/SHA256SUMS"
+sha256sums_url=${SHA256SUMS_URL:-"https://${host}/${sha256sums_path}"}
imgfile="${workspace}/yardstick-image.tar.gz"
filename=$(basename $image_url)
@@ -54,14 +54,14 @@ filename=$(basename $image_url)
download() {
test -d $workspace || mkdir -p $workspace
cd $workspace
- rm -f MD5SUMS # always download the checksum file to a detect stale image
- wget $md5sums_url
+ rm -f SHA256SUMS # always download the checksum file to a detect stale image
+ wget $sha256sums_url
test -e $filename || wget -nc --progress=dot:giga $image_url
- grep $filename MD5SUMS | md5sum -c ||
+ grep $filename SHA256SUMS | sha256sum -c ||
if [ $? -ne 0 ]; then
rm $filename
wget -nc --progress=dot:giga $image_url
- grep $filename MD5SUMS | md5sum -c
+ grep $filename SHA256SUMS | sha256sum -c
fi
cd -
}