aboutsummaryrefslogtreecommitdiffstats
path: root/tools/yardstick-img-modify
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-03-21 01:23:48 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-21 01:23:48 +0000
commitd742db328b70415c726ae9ed0aa7f16d79d7c852 (patch)
treebc6a716638dd99c85a4361550d2b3dc694d97f68 /tools/yardstick-img-modify
parent59a633933aa9cfd9d807cdfa9e11187990921e85 (diff)
parentfe655f15b0838b41c8c91543898ceebf23f1494c (diff)
Merge "Bugfix: replace MD5SUM with SHA256SUMs"
Diffstat (limited to 'tools/yardstick-img-modify')
-rwxr-xr-xtools/yardstick-img-modify12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/yardstick-img-modify b/tools/yardstick-img-modify
index b4f632bb2..658717c71 100755
--- a/tools/yardstick-img-modify
+++ b/tools/yardstick-img-modify
@@ -48,8 +48,8 @@ fi
image_path="${release}/current/${release}-server-cloudimg-${YARD_IMG_ARCH}-${boot_mode}.img"
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.img"
raw_imgfile_basename="yardstick-${release}-server.raw"
@@ -62,14 +62,14 @@ apt-get install -y parted
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
for i in $(seq 0 9); do