summaryrefslogtreecommitdiff
path: root/image/backends/iso.cc
diff options
context:
space:
mode:
Diffstat (limited to 'image/backends/iso.cc')
-rw-r--r--image/backends/iso.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/image/backends/iso.cc b/image/backends/iso.cc
index 52f0367..00f5ae4 100644
--- a/image/backends/iso.cc
+++ b/image/backends/iso.cc
@@ -203,7 +203,9 @@ public:
*/
for(const std::string mount : {"dev", "proc", "sys"}) {
const std::string path = this->ir_dir + "/target/" + mount;
- ::umount(path.c_str());
+ if(::umount(path.c_str()) == EBUSY) {
+ run_command("umount", {"-R", path});
+ }
}
fs::remove_all(this->ir_dir, ec);
if(ec) {