diff options
author | Neil Williams <codehelp@debian.org> | 2016-08-11 19:31:58 +0100 |
---|---|---|
committer | Neil Williams <codehelp@debian.org> | 2016-08-11 19:31:58 +0100 |
commit | fa079856480860313e9138668e1ebef8179a3abe (patch) | |
tree | 2c72adcd688f2990e90a83c9575adca935b2ef15 | |
parent | 479f2395ba42813e284a15e442c38b8536155ce8 (diff) | |
download | vmdebootstrap-fa079856480860313e9138668e1ebef8179a3abe.tar.gz |
ensure the build tests can handle times that kpartx goes wrong without blaming the test
-rw-r--r-- | yarns/shell.lib | 2 |
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" } |