-imagex_mountrw() {
- echo "imagex mountrw $@"
- ../imagex mountrw --debug "$@" &> mount.log &
- while ! mountpoint $2 >& /dev/null; do
- sleep 0.01;
- done
- return 0
+imagex_unmount() {
+ # Give the --lazy flag to work around a problem testing on Ubuntu and
+ # other OS's running Gnome, as they have a daemon
+ # "gvfs-gdu-volume-monitor" that apparently likes to randomly read
+ # filesystems that get mounted, thereby stopping them from being
+ # unmounted.
+ imagex unmount "$@" --lazy