diff options
author | Renato Botelho <renato@netgate.com> | 2017-02-15 08:55:38 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-15 08:55:45 -0200 |
commit | bcb6177f4a6ee5934620060f12c1c5bc4f6abd06 (patch) | |
tree | f2cfbe8f8d5509b815d88ff1acf0ff7a4cb933cc /tools | |
parent | 5b614dd42ddcf328c4f50f8c43c393c2b0856701 (diff) | |
download | pfsense-bcb6177f4a6ee5934620060f12c1c5bc4f6abd06.zip pfsense-bcb6177f4a6ee5934620060f12c1c5bc4f6abd06.tar.gz |
Make sure OVA_TMP is umounted before start using it
Diffstat (limited to 'tools')
-rw-r--r-- | tools/builder_common.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh index 091266a..b4e1511 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -920,6 +920,17 @@ create_ova_image() { LOGFILE=${BUILDER_LOGS}/ova.${TARGET}.log if [ -d "${OVA_TMP}" ]; then + local _dev + # XXX Root cause still didn't found but it doesn't umount + # properly on looped builds and then require this extra + # check + while true; do + _dev=$(mount -p ${OVA_TMP} 2>/dev/null | awk '{print $1}') + [ $? -ne 0 -o -z "${_dev}" ] \ + && break + umount -f ${OVA_TMP} + mdconfig -d -u ${_dev#/dev/} + done chflags -R noschg ${OVA_TMP} rm -rf ${OVA_TMP} fi |