From b2ee641c325bd8e069c8dd4c6eddd62ed4432dfb Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 23 Sep 2016 06:39:38 -0300 Subject: [PATCH] Add a workaround to umount virtual image directories --- tools/builder_common.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/builder_common.sh b/tools/builder_common.sh index 0c23090887..ced9483e8e 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -673,13 +673,14 @@ create_ova_image() { echo ">>> ERROR: Error mounting temporary vmdk image. STOPPING!" | tee -a ${LOGFILE} print_error_pfS fi - trap "umount ${_mntdir}; mdconfig -d -u ${_md}; return" 1 2 15 EXIT + trap "sync; sleep 3; umount ${_mntdir}; mdconfig -d -u ${_md}; return" 1 2 15 EXIT echo "Done!" | tee -a ${LOGFILE} clone_directory_contents ${FINAL_CHROOT_DIR} ${_mntdir} sync + sleep 3 umount ${_mntdir} 2>&1 >>${LOGFILE} mdconfig -d -u ${_md} trap "-" 1 2 15 EXIT