Often I come to my mac sitting on my desk in the morning and need to simply unplug it and put it in a bag. While maybe not strictly necessary to properly eject the attached USB drive, it sure would be nice if there were a way to do so without first logging in.
1 Answer
AFAIK there is no save way to eject an external drive from the lock screen.
You have several options though:
Purchase and install Mountain and enable "Unmount external volumes on sleep". The feature still seems to be experimental.
Create a LaunchDaemon which ejects your external drive(s) gracefully at say 5am. Here is an example of a bash script to start with:
#!/bin/sh /usr/sbin/diskutil list | grep -e 'disk[1-9]s.*' | sed 's/.*\(disk[0-9].*\)/\1/' | xargs -I{} /usr/sbin/diskutil unmount {}
If you don't want to write a LaunchDaemon, Sleepwatcher should support your efforts.
Unmount all external volumes before setting your Mac(s) to sleep.
-
Thanks for all that. Holding out in hopes someone does have a direct answer. 1-3 aren't ideal.– jb510Commented Sep 15, 2015 at 21:36