QRecall Community Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 

auto unmount after action complete? RSS feed
Forum Index » General
Author Message
David Cretney


Joined: Sep 3, 2008
Messages: 16
Offline
I want to me able to grab my laptop and go in the morning. But often It is plugged in and I forget to unmount the USB backup drive, I get to my destination and get the reminder that I failed to properly unmount the volume.

My backup action starts at 0300. How can I set it to unmount the volume when it is complete? This way if my MacBook is asleep I can unplug it and go without potential for corruption etc...

Thanks,
David
James Bucanek


Joined: Feb 14, 2007
Messages: 1572
Offline
David,

QRecall already unmounts the volume containing the archive, but only if it wasn't mounted when the action started. QRecall automatically tries to mount the archive volume before the action starts. If the volume previously offline and is successfully mounted, it will also attempt to unmount it again when the action finishes. If the volume was already mounted, it does nothing before or after.

So one solution would simply be to leave the volume unmounted. QRecall will mount it before the 0300 action runs, and unmount it again when it's finished.

If that's not practical (because most external drive auto-mount when connected, or maybe you're just using it for other documents), there's another approach.

You could create an epilog script to unmount the archive volume at the end of the action. A bash script to accomplish this would look like this:

#!/bin/bash


diskutil unmount "${QR_ARCHIVE_VOLUME_MOUNTPOINT}"

QRecall provides the script with the mount point of the volume containing the archive; all this script does is pass that to the diskutil tool requesting that the volume be unmounted.

You can create this script in any plain ASCII text editor (I would suggest BBEdit, which is free to use). Save the file with 7-bit ASCII or UTF-8 encoding (no BOM) and name the file with a .sh extension. If you're not using a smart editor like BBEdit, you'll need to use the chmod a+x ... command to assign execution privileges to the script file.

Then go into capture action and add the script as the action's epilog.

Note: in all cases (this script, QRecall, dragging the volume to the trash), the volume will not be unmounted if other software has files open on it.

- QRecall Development -
[Email]
David Cretney


Joined: Sep 3, 2008
Messages: 16
Offline
HI James, I followed your directions and it worked! Thanks so much.

-David
 
Forum Index » General
Go to:   
Mobile view
Powered by JForum 2.8.2 © 2022 JForum Team • Maintained by Andowson Chang and Ulf Dittmer