Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DragonStar

macrumors newbie
Original poster
Mar 30, 2008
1
0
Hey all,
Trying to get a network drive to automount upon wakeup using Sleepwatcher. The shell script that it executes fine when run from terminal, but only some parts seem to work when it's run upon wakeup.

I've tried to do it both using applescript and directly, hence the two different modes in it:

#!/bin/sh
sleep 20
osascript ~/.mount.scpt
mkdir /volumes/TMBACKUP1
mount_smbfs //USERNAME:pASSWORD@upstairs/TMBAC* KUP /Volumes/TMBACKUP1

And the applescript for .mount.scpt is:

try
mount volume "smb://USERNAME:pASSWORD@upstairs/* TMBACKUP"
end try

All componenents work fine on their own, for instance, typing osascript ~/.mount.scpt mounts the drive, as does running ~/.wakeup (what the first script is called), that also works. But when run from wakeup the directory is created, but neither the applescript or mount seem to work, at least the directory is empty afterwards.

Does anyone have any suggestions for me? I'm getting very frustrated over this!
 
same problem here!
Part of my applescript is executed, but the mount part doesn't work
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.