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

MyRomeo

macrumors 6502
Original poster
Jul 22, 2010
493
86
United Kingdom
Hi, I wonder if you can help me out.

I currently have a MBA and WD NAS on which I have a 130gb sparsebundle image file that I would like to use for the wifes iPhoto collection. To do this I manually 'mount' this sparsebundle and it has the iPhoto library saved on it.

At the moment I have an applescript that runs at startup to connect to and mount the NAS volume. I am trying to get this script to then mount the sparsebundle image too but can not get it to work. I either get a compile error or a 'server not available' error.

The script looks like this:

mount volume "smb://192.168.0.2/Directory"

The authentication is handled by keychain.

Now, the sparesebundle resides at

smb://192.168.0.2/Directory/Folder/file.sparsebundle

How can I modify my simple script so that it connects and mounts the NAS volume THEN mounts the sparsebundle? Perhaps it needs some logic in to wait or check for the NAS volume before proceeding with the sparsebundle?

I tried adding the sparsebundle to the user login items but this is where I get the server not available error. I can get the nas volume working both in login items or via script. The sparsebundle mounts and works perfect when mounted manually. 300mbps 5ghz N is a charm :)
 
I think you could do it with the below shell script in your Applescript.

Code:
hdiutil attach -mountpoint ~/myMountPoint mySparsebundle.dmg
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.