summaryrefslogtreecommitdiffstats
path: root/tools/builder_common.sh
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-02-15 17:27:44 -0200
committerRenato Botelho <renato@netgate.com>2017-02-15 17:27:44 -0200
commit2c1d42bf08e761665d097bdb610c19b55d3e887e (patch)
tree3460b1a7c597a0c78edd24f16a8087f94da3663f /tools/builder_common.sh
parentdc2a4fd23cb968f33f65adfa0a1782ba02e71e68 (diff)
downloadpfsense-2.3.3.zip
pfsense-2.3.3.tar.gz
Check for correct directoryv2.3.3
Diffstat (limited to 'tools/builder_common.sh')
-rw-r--r--tools/builder_common.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index 2d6b404..9099d67 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -919,23 +919,24 @@ create_ova_image() {
LOGFILE=${BUILDER_LOGS}/ova.${TARGET}.log
- if [ -d "${OVA_TMP}" ]; then
+ local _mntdir=${OVA_TMP}/mnt
+
+ if [ -d "${_mntdir}" ]; 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}')
+ _dev=$(mount -p ${_mntdir} 2>/dev/null | awk '{print $1}')
[ $? -ne 0 -o -z "${_dev}" ] \
&& break
- umount -f ${OVA_TMP}
+ umount -f ${_mntdir}
mdconfig -d -u ${_dev#/dev/}
done
chflags -R noschg ${OVA_TMP}
rm -rf ${OVA_TMP}
fi
- local _mntdir=${OVA_TMP}/mnt
mkdir -p ${_mntdir}
if [ -z "${OVA_SWAP_PART_SIZE_IN_GB}" -o "${OVA_SWAP_PART_SIZE_IN_GB}" = "0" ]; then
OpenPOWER on IntegriCloud