summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlex Yang <yangyang1@zte.com.cn>2017-04-16 02:18:38 +0800
committerAlex Yang <yangyang1@zte.com.cn>2017-04-16 02:18:38 +0800
commit6eaa8fc812ef8feeac5ec2f76c9fdc110b2b5c75 (patch)
treef403fe8c5871635ce41c41ea7007c22ba672289c /tools
parent0d7114ad9efedeba16c7e0a448606c9d955aa338 (diff)
The image file is deleted mistakenly
There's an mistake in patch 33327. See https://gerrit.opnfv.org/gerrit/#/c/33327/ The cleanup function was called twice, so the image file was deleted. Change-Id: I5fe6a90b46739d1c6d8b66365d2c8e55350cde00 Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/daisy-img-modify.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/daisy-img-modify.sh b/tools/daisy-img-modify.sh
index f172ceec..90910a14 100755
--- a/tools/daisy-img-modify.sh
+++ b/tools/daisy-img-modify.sh
@@ -211,9 +211,6 @@ cleanup() {
kpartx -dv $raw_imgfile || eliminate
fi
rm -f $raw_imgfile
- if [ -f $imgfile ]; then
- rm -rf $imgfile
- fi
rm -rf $mountdir
}
@@ -239,6 +236,9 @@ error_trap()
main() {
cleanup
+ if [ -f $imgfile ]; then
+ rm -rf $imgfile
+ fi
trap "error_trap" EXIT SIGTERM