![]() |
|||||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
#1
|
|||
|
|||
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! |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
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. |
#4
|
||||
|
||||
Something like this:
Code:
#!/bin/sh nohup /bin/bash -c "sleep 20; diskutil unmount /Volumes/TheShare" &
__________________
--Dave Nanian |
#5
|
|||
|
|||
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. |
#6
|
||||
|
||||
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 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Booting from backup | guruuno | General | 27 | 10-17-2009 12:53 AM |
SD! & HDD copy speed fun | DaleMeyn | General | 3 | 03-20-2006 05:24 PM |
Copy error and crash | offdahook84 | General | 3 | 10-01-2005 11:10 PM |
BackUp hangs at 3% | JimK | General | 10 | 09-27-2005 10:48 AM |
Error: No space left on device | tradervic | General | 11 | 06-29-2005 05:50 PM |