script to unmount and mount local volume?

Hi StefanK,

set theDisk to "iMac G5"
do shell script "diskutil mount `diskutil list | awk '/ " & theDisk & " / {print $NF}'`"

This shellscript works perfectly for me and I have a space in my volume name. Been working around for a while for this one until I found this thread.

Thanks StefanK

set theDisk to "iMac G5"
do shell script "diskutil mount `diskutil list | awk '/ " & theDisk & " / {print $NF}'`"

If I want the script to end if the volume is not found, how do I script that ?

Thanks in advance.