qubeize-image: unmount image even after failed build

This commit is contained in:
Marek Marczykowski 2012-11-17 12:55:05 +01:00
parent bf43862f3b
commit 1df5f9426a

View File

@ -27,6 +27,13 @@ if [ $ID != 0 ] ; then
exit 1
fi
function cleanup() {
if grep -q " $PWD/mnt " /proc/mounts; then
umount mnt/proc mnt
fi
}
trap cleanup ERR
IMG=qubeized_images/$NAME-root.img
echo "--> Copying $CLEANIMG to $IMG..."