summaryrefslogtreecommitdiffstats
path: root/tools
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:30:24 -0200
commitf25c08c95b76b5eb21690bea8cc5dd70cd3ab970 (patch)
treed364d21973e1ebc9ae5740c1cf3112e8b7940aa3 /tools
parentd50e8445db76913b0eecdaf23015591f59543151 (diff)
downloadpfsense-f25c08c95b76b5eb21690bea8cc5dd70cd3ab970.zip
pfsense-f25c08c95b76b5eb21690bea8cc5dd70cd3ab970.tar.gz
Check for correct directory
Diffstat (limited to 'tools')
-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 867520e..08e1cc0 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -282,16 +282,18 @@ 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}
@@ -300,7 +302,6 @@ create_ova_image() {
mkdir -p $(dirname ${OVAPATH})
- 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