Revision 2c1d42bf
Added by Renato Botelho over 8 years ago
tools/builder_common.sh | ||
---|---|---|
919 | 919 |
|
920 | 920 |
LOGFILE=${BUILDER_LOGS}/ova.${TARGET}.log |
921 | 921 |
|
922 |
if [ -d "${OVA_TMP}" ]; then |
|
922 |
local _mntdir=${OVA_TMP}/mnt |
|
923 |
|
|
924 |
if [ -d "${_mntdir}" ]; then |
|
923 | 925 |
local _dev |
924 | 926 |
# XXX Root cause still didn't found but it doesn't umount |
925 | 927 |
# properly on looped builds and then require this extra |
926 | 928 |
# check |
927 | 929 |
while true; do |
928 |
_dev=$(mount -p ${OVA_TMP} 2>/dev/null | awk '{print $1}')
|
|
930 |
_dev=$(mount -p ${_mntdir} 2>/dev/null | awk '{print $1}')
|
|
929 | 931 |
[ $? -ne 0 -o -z "${_dev}" ] \ |
930 | 932 |
&& break |
931 |
umount -f ${OVA_TMP}
|
|
933 |
umount -f ${_mntdir}
|
|
932 | 934 |
mdconfig -d -u ${_dev#/dev/} |
933 | 935 |
done |
934 | 936 |
chflags -R noschg ${OVA_TMP} |
935 | 937 |
rm -rf ${OVA_TMP} |
936 | 938 |
fi |
937 | 939 |
|
938 |
local _mntdir=${OVA_TMP}/mnt |
|
939 | 940 |
mkdir -p ${_mntdir} |
940 | 941 |
|
941 | 942 |
if [ -z "${OVA_SWAP_PART_SIZE_IN_GB}" -o "${OVA_SWAP_PART_SIZE_IN_GB}" = "0" ]; then |
Also available in: Unified diff
Check for correct directory