Auto-mount script

shawntbrothers

Registered
Hey everyone,

I've run in to a problem recently with auto-mounting and I'm hoping someone in this forum has an answer.

I have a Synology DiskStation NAS that I use to store my iTunes library, video, pictures and other misc files. My wife and I share a single iTunes library between two computers and this is why I have it on the NAS (also, my MacBook Air doesn't have the 500+gb drive needed to store it). The drive is mapped on my wife's Windows machine and I've got the script down to auto mount it on my MacBook Air. Right now both of us can access the library and make changes as long as we don't do it at the same time.

Earlier this week I went out of town and wanted to access my iTunes library. It was easy enough to connect using WebDav connection to the NAS, but the new volume listed in the finder window had a different name than when I mounted locally at home. So here's what I'd like my new script to do:

1. Connect to and mount the local NAS

2. Connect to and mount the NAS through a WebDav connection if and only if Number 1 cannot be completed (for example if I'm on the road and the auto script starts it will encounter an error not being able to connect to the local network but will then initiate the WebDav connection)

3. If the WebDav connection is made, then the name that is shown in finder must match the name shown in finder when connecting locally. This step is only to alleviate the headache of having to go and find the iTunes library folder each time the connection type changes)

If you need more clarification on anything just let me know. Like I said, I know how to auto mount locally and through WebDav, but I want to put those steps together and have it work seamlessly.
 
One: To Auto-mount a network drive just Add the mounted drive (in Lion) in System Preferences->User & Groups, Your User Account, Login Items, + button.

Two: When the network drive is mounted just drag it to the right side of your dock. Then just in the future click on the Dock shortcut and it will mount.

Three: Use some kind of scrip to mount your drive at certain times and auto-demount at certain times.

Now how is the network drive formatted? I ask because if the network drive is FAT32 then that would explain a lot.
 
Back
Top