# HG changeset patch # User Paul Boddie # Date 1384298059 -3600 # Node ID 2b83ea4f8e5eaaee93f09a1371ab80c4564bc2d8 # Parent b8454480ef529ed0d535daefb7539a300ed98bc1 Added handling of any failure to mount the image. diff -r b8454480ef52 -r 2b83ea4f8e5e uml-access-image --- a/uml-access-image Wed Nov 13 00:13:33 2013 +0100 +++ b/uml-access-image Wed Nov 13 00:14:19 2013 +0100 @@ -37,7 +37,11 @@ if [ ! -e "$IMAGEDIR" ]; then mkdir "$IMAGEDIR" fi -sudo mount -o loop "$IMAGE" "$IMAGEDIR" + +if ! sudo mount -o loop "$IMAGE" "$IMAGEDIR" ; then + echo "Could not mount the image." 1>&2 + exit 1 +fi echo "Performing the requested activity..." 1>&2 "$COMMAND" $*