summaryrefslogtreecommitdiff
path: root/Meta/build-image-qemu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Meta/build-image-qemu.sh')
-rwxr-xr-xMeta/build-image-qemu.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh
index 10ff5384f9..b26fb1838e 100755
--- a/Meta/build-image-qemu.sh
+++ b/Meta/build-image-qemu.sh
@@ -62,8 +62,11 @@ cleanup() {
if [ $use_genext2fs = 0 ] ; then
printf "unmounting filesystem... "
umount mnt || ( sleep 1 && sync && umount mnt )
+ rmdir mnt
+ else
+ rm -rf mnt
fi
- rmdir mnt
+
if [ "$(uname -s)" = "OpenBSD" ]; then
vnconfig -u "$VND"
elif [ "$(uname -s)" = "FreeBSD" ]; then