#13
|
|||
|
|||
Chris,
Your hacks are beautiful. In some preliminary testing here with multiple AFP mounts, the perl version (the only one I'm testing), works great. Just so you know here's what some of my afp mount points look like from the mount command. Quote:
Code:
if [[ `mount | awk '/^afp_/'` != "" ]]; then mount | awk '/^afp_/ {print $3}' | xargs -n 1 umount -f num_mounts=`mount | grep -c ^afp` for (( i = 0; i < $num_mounts; i++ )); do mountpt=`mount | grep ^afp | grep -o '/.* (' | sed 's_/Volumes/__g' | sed 's_ (_:_g' | head -1` cmd='tell application "Finder" to eject '\"$mountpt\" osascript -e "$cmd" sleep 2 done fi I really hope this gets indexed by Google as I've been trying to find a way to automatically unmount any connected drives when I switch locations on my laptop. BTW, I did figure that out. It involves a small shell script and a launchd process. Of course, if there was some way to get the mount point from SD then we wouldn't have to go through all these contortions. But the exercise still helps me for the other script. Andy |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Smart Update copying files that haven't been changed? | salparadi | General | 3 | 11-05-2006 11:40 AM |
Copying newer files across volumes. | chip | General | 1 | 08-09-2006 08:07 PM |
Long Hang While Copying | BackerUpper | General | 4 | 06-12-2006 08:26 AM |
SuperDuper! Erasing Audio Files? | Emerson | General | 3 | 06-22-2005 01:41 PM |
Smart update copying all files each time | fabius | General | 15 | 05-29-2005 09:29 PM |