Project

General

Profile

« Previous | Next » 

Revision e3b1ebd2

Added by Renato Botelho over 8 years ago

Make sure OVA_TMP is umounted before start using it

View differences:

tools/builder_common.sh
920 920
	LOGFILE=${BUILDER_LOGS}/ova.${TARGET}.log
921 921

  
922 922
	if [ -d "${OVA_TMP}" ]; then
923
		local _dev
924
		# XXX Root cause still didn't found but it doesn't umount
925
		#     properly on looped builds and then require this extra
926
		#     check
927
		while true; do
928
			_dev=$(mount -p ${OVA_TMP} 2>/dev/null | awk '{print $1}')
929
			[ $? -ne 0 -o -z "${_dev}" ] \
930
				&& break
931
			umount -f ${OVA_TMP}
932
			mdconfig -d -u ${_dev#/dev/}
933
		done
923 934
		chflags -R noschg ${OVA_TMP}
924 935
		rm -rf ${OVA_TMP}
925 936
	fi

Also available in: Unified diff