View Single Post
  #8  
Old 08-22-2007, 11:30 AM
afragen afragen is offline
Registered User
 
Join Date: May 2007
Location: Southern California
Posts: 13
Send a message via AIM to afragen
Quote:
Originally Posted by dnanian View Post
There's a difference between image and host drive. You can't mount an image before it exists, of course. But you can point us at the location where the image is to be stored.

SD! does unmount when it creates/mounts.

If an image is not unmounted, it remains on your desktop. If you were to crash, it wouldn't be properly unmounted, of course.
Guys, don't be frustrated. There's a script at that above URL that I run at the end of every SD run that unmounts the sparseimages, or any other AFP mounts for that matter.

Here's the gist of it.

Code:
#!/usr/bin/env bash
# http://www.shirt-pocket.com/forums/showthread.php?t=2378

sleep 45

if [[ `mount | awk '/^afp_/'` != "" ]]; then
  mount | grep ^afp_ \
  | perl -pe 's/.*? on //;s/( \([^)]*\))?$//;'"s/'/'\\\\''/;s/^/'/;s/\$/'/" \
  | xargs umount -f
fi
Reply With Quote