Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-27-2006, 03:30 PM
michael.green michael.green is offline
Registered User
 
Join Date: Nov 2006
Posts: 14
Unmount share after copy

One of the tasks I use SD! for is daily copies of my user directory to a SimpleShare NAS. I have seven sparseimage files. Each one is updated on its day of the week in the middle of the night.

My question is: what is the preferred way to unmount the share after SD! is done?

I know that SD! unmounts the relevant sparseimage file. But the share is still mounted and I would like an automatic way of unmounting that.

Thanks!
Reply With Quote
  #2  
Old 11-27-2006, 04:35 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
You could try to either modify the "schedule driver" (inside the application package) to do it, or write a little shell script that tosses an event into the background, waits 20 seconds or so and then unmounts...
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 11-28-2006, 01:45 AM
michael.green michael.green is offline
Registered User
 
Join Date: Nov 2006
Posts: 14
I need a little more hand holding, I'm afraid.

Here's the shell script I have (name: unmountTheShare)
#!/bin/sh
sleep 20
umount /Volumes/TheShare

Here's the error I get in SD!'s Phase 3:
| 10:31:36 PM | Info | ...ACTION: Running shell script unmountTheShare
| 10:31:36 PM | Info | ......COMMAND => Invoking After Copy shell script: /Users/michaelgreen/Library/Scripts/unmountTheShare
| 10:33:36 PM | Error | umount: unmount(/Volumes/TheShare): Resource busy

I see what the problem is. SD! hasn't unmounted the sparseimage file yet.

I gather I'm missing the 'event tossed into the background'. But I don't know how to do that, that is, toss an event into the background. I assume it's just ... one ... more ... line.

Thanks again.
Reply With Quote
  #4  
Old 11-28-2006, 11:51 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Something like this:

Code:
#!/bin/sh
nohup /bin/bash -c "sleep 20; diskutil unmount /Volumes/TheShare" &
__________________
--Dave Nanian
Reply With Quote
  #5  
Old 12-09-2006, 12:56 AM
michael.green michael.green is offline
Registered User
 
Join Date: Nov 2006
Posts: 14
Thanks for the suggestion. SD! no longer gives me an error, but the share remains mounted.

Looking up diskutil in an edition of Mac OS X in a Nutshell (for 10.2), I see it says that diskutil needs to run with "special permissions". Perhaps that's what's amiss. Changing my account, the one that SD! runs under, to administrator doesn't seem to do the trick, though.

Does it have to run as root? And, if so, how do I make that happen?

Is there something else I should look into as a diagnostic matter?

Thanks again for all your help.
Reply With Quote
  #6  
Old 12-09-2006, 09:14 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
No, it's already running with escalated permissions. Does your drive perhaps have a space in its name or something like that? Check the Console to see if there are any errors.
__________________
--Dave Nanian
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting from backup guruuno General 27 10-16-2009 11:53 PM
SD! & HDD copy speed fun DaleMeyn General 3 03-20-2006 04:24 PM
Copy error and crash offdahook84 General 3 10-01-2005 10:10 PM
BackUp hangs at 3% JimK General 10 09-27-2005 09:48 AM
Error: No space left on device tradervic General 11 06-29-2005 04:50 PM


All times are GMT -4. The time now is 06:05 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.