Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'know how to unmount network drives on sleep?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
know how to unmount network drives on sleep?
Authored by: triplef on Jul 18, '03 08:40:49AM

Nice idea! I tried using

for VOL in /Volumes/*; do
        diskutil eject "$VOL"
done

in my .sleep file, which works nice with mounted disk images. However, I cannot get a disk mounted from a Linux box over Netatalk to eject. It simply doesn't work, even when I execute the command manually.

bash-2.05a$ diskutil eject "/Volumes/Space"
Disk Utility Tool       Š2002, Apple Computer, Inc.
Usage:  diskutil [mount(Disk)|unmount(Disk)|eject]
[Mount Point|Disk Identifier|Device Node]
Mount, unmount or eject disks or volumes.  Root access is not required.
Example:  diskutil unmount /Volumes/SomeDisk

Any ideas?



[ Reply to This | # ]
know how to unmount network drives on sleep?
Authored by: jonny5 on Jul 18, '03 09:42:40AM

Now that I'm at home & attempting this w/ my network, it seems that diskutil doesn't work (unmount or eject) for disks shared via SMB either. Anyone know how to unmount these via the command line???



[ Reply to This | # ]
There is way to unmount network volumes
Authored by: atverd on Jul 18, '03 01:12:51PM

umount /Volumes/name
will do, so you can put it as second similar loop in your script after first pass with diskutil. But after all you'll need to run
disktool -r
to refresh internal table of mounts used by Finder and Co (to remove icons from desktop).



[ Reply to This | # ]