Index: src/scripts/mod_image_for_test.sh |
diff --git a/src/scripts/mod_image_for_test.sh b/src/scripts/mod_image_for_test.sh |
index c38fc92117342153e6e099b380fc304177b735ee..8d778e9d2f636018e39b15588eaf34faf0c19e82 100755 |
--- a/src/scripts/mod_image_for_test.sh |
+++ b/src/scripts/mod_image_for_test.sh |
@@ -75,6 +75,8 @@ cleanup() { |
cleanup_rootfs_loop |
fi |
+ rmdir "${ROOT_FS_DIR}" |
+ |
# Turn die on error back on. |
set -e |
} |
@@ -94,11 +96,12 @@ else |
fi |
set -e |
-trap cleanup EXIT |
ROOT_FS_DIR=$(dirname "${FLAGS_image}")/rootfs |
mkdir -p "${ROOT_FS_DIR}" |
+trap cleanup EXIT |
+ |
# Figure out how to loop mount the rootfs partition. It should be partition 3 |
# on the disk image. |
offset=$(partoffset "${FLAGS_image}" 3) |