From: Ryan.RCS Date: Fri, 9 Dec 2016 03:06:41 +0000 (+0000) Subject: Bugfixed:run command: "yardstick-img-modify" fail! X-Git-Tag: danube.1.0~168^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F25701%2F3;p=yardstick.git Bugfixed:run command: "yardstick-img-modify" fail! Avoid incorrect deletion of $raw_imgfile when the command: "kpartx -dv $raw_imgfile" execute failed. JIRA: YARDSTICK-424 Change-Id: I34dac60bda6c028c4b0f0bfd9ad077e2d5dbb0ff Signed-off-by: Ryan.RCS --- diff --git a/tools/yardstick-img-modify b/tools/yardstick-img-modify index c28e2ad59..0033383ef 100755 --- a/tools/yardstick-img-modify +++ b/tools/yardstick-img-modify @@ -153,7 +153,7 @@ cleanup() { mount | grep $mountdir && umount $mountdir mount | grep "/mnt/vivid" && umount "/mnt/vivid" if [ -f $raw_imgfile ]; then - kpartx -dv $raw_imgfile || true + kpartx -dv $raw_imgfile fi rm -f $raw_imgfile rm -rf $mountdir