summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2016-08-11 19:31:58 +0100
committerNeil Williams <codehelp@debian.org>2016-08-11 19:31:58 +0100
commitfa079856480860313e9138668e1ebef8179a3abe (patch)
tree2c72adcd688f2990e90a83c9575adca935b2ef15
parent479f2395ba42813e284a15e442c38b8536155ce8 (diff)
downloadvmdebootstrap-fa079856480860313e9138668e1ebef8179a3abe.tar.gz
ensure the build tests can handle times that kpartx goes wrong without blaming the test
-rw-r--r--yarns/shell.lib2
1 files changed, 2 insertions, 0 deletions
diff --git a/yarns/shell.lib b/yarns/shell.lib
index 69b7b06..1f8432e 100644
--- a/yarns/shell.lib
+++ b/yarns/shell.lib
@@ -85,6 +85,8 @@ kpartx_image_partition()
unkpartx_image()
{
+ dmsetup remove /dev/mapper/$(dmsetup ls|awk -F' ' '{print $1}')
+ losetup -d $(losetup -a | grep "$1" | awk -F':' '{print $1}')
kpartx -d "$1"
}