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 02-19-2005, 11:09 AM
Pixx Pixx is offline
Registered User
 
Join Date: Feb 2005
Posts: 11
Getting SD to Allow Sleep after Copy

Hi,

Following on from your comment to my post on VT, (where I suggested you add some options to SD to allow the Mac to be put to sleep or closed down after copying) the suggestion you made of adding a custom shell script:

osascript -e "tell application \"finder\" to sleep"

isn't working - SD gives an error like "Error while invoking customization script [path]'.

I've copied the line of text above into a simple text file and navigated to the text file in Options -> Run Customization Script to set it in SD.

Do I need to create a different sort of file (ie. with a different extension), or do I need to place the text file somewhere in particular?

Thanks
Reply With Quote
  #2  
Old 02-19-2005, 11:22 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
Hi, Pixx -- glad you were able to make it here to the forums.

Place this in a file, with the first line:

#!/bin/sh

Then, execute the following command (in Terminal):

chmod +x filename

where "filename" is the name of the file you used. I'd make the extension "sh" to make it clear that this is a shell script.

Test it by running ./filename.sh in Terminal: it should put the system to sleep.

Once you've completed testing that way, then set this file as the customizations script, and you should be golden. Let me know.
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 02-19-2005, 12:54 PM
Pixx Pixx is offline
Registered User
 
Join Date: Feb 2005
Posts: 11
Thumbs up

Thanks Dave,

It works from terminal fine now (although not using ./filename - you need to drag + drop the file onto terminal to get the correct path) so I expect it should work on the next synch run.

After doing some digging, the original error in console was:

2005-02-18 00:15:32.812 SuperDuper![1043] ***ERROR OCCURRED: sh: line 1: /Applications/SuperDuper/superduper_sleep_script: Permission denied

2005-02-18 00:15:32.814 SuperDuper![1043] ***ERROR OCCURRED: ****FAILED****: result=32256 errno=1 (Operation not permitted)

So I imagine your 'chmod +x' made the difference by adding 'Execute' permissions.

I'll report back to confirm it worked - but it would be lovely to have sleep/shutdown as options in 'On Completion' in v 2.0

Thanks again.
Reply With Quote
  #4  
Old 02-19-2005, 01:13 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
Sorry: made an assumption that it was in the current directory. My mistake, Pixx!

(If it *is* in the current directory, you'd think you could execute it by just typing its name, but you can't -- you have to say "./filename", where "." is the current directory. Was just trying to help with that case.)

Definitely have some additional options planned for v2.0. Stay tuned.
__________________
--Dave Nanian
Reply With Quote
  #5  
Old 02-19-2005, 07:30 PM
Pixx Pixx is offline
Registered User
 
Join Date: Feb 2005
Posts: 11
Hi Dave,

SD has just run but didn't let the Mac sleep.

SD Error was the same - 'error in customization script'.

Here's the log entry:

|11:49:14 PM|Info| ...ACTION: Execute Site Customization Script /Applications/SuperDuper/superduper_sleep_script.sh
|11:49:14 PM|Info| ......COMMAND => Invoking site customization script: /Applications/SuperDuper/superduper_sleep_script.sh
|11:49:21 PM|Error| 29:34: execution error: Finder got an error: Application isn't running. (-600)

The script has this:

#!/bin/sh
osascript -e "tell application \"finder\" to sleep"

The path in SD is correct, and (as I said above) the script runs from terminal fine.

Have I missed something?

Thanks

Reply With Quote
  #6  
Old 02-19-2005, 07:38 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
OK -- sounds like osascript doesn't want to let you script it directly. Interesting.

Instead, try putting those commands in an Applescript, compile to an executable using Script Editor, and then change the command to "/usr/bin/open script-name", i.e.:

#!/bin/sh
/usr/bin/open /Applications/WhateverMyScriptIs

(You'll have to quote it if there are strange characters or spaces. Again, test in Terminal first.)
__________________
--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
How to copy Sandbox back to Macintosh HD? BudSimrin General 3 03-31-2007 07:46 AM
SuperDuper failed to copy, interpret this error mwarner General 1 02-13-2005 10:05 AM
Smart Backup Error bill s General 20 02-04-2005 09:46 AM
ASR Image freeze PeterBest General 5 12-01-2004 09:02 AM
When I try to copy a single directory, I end up copying the whole disk. Why? dnanian Frequently Asked Questions 0 06-22-2004 06:59 PM


All times are GMT -4. The time now is 06:34 PM.


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