Quantcast

Forums | MacLife

You are not logged in.

#1 2009-04-12 12:39 pm

Jasoco
Your own personal Jesus
From: Doylestown, PA, USA, Earth
Registered: 2000-08-26
Posts: 8848
Website

Mount networked drives at bootup?

I use one of my networked HD's so much I figure it would be smarter to have it just connect at log in.

How would I go about doing this, but still have it fail gracefully?

In other words, I want it to mount automatically if I am in my network, but if I am out somewhere else, I don't want it giving me a "Cannot connect" error. That would feel too much like Windows. Graceful failing would be nice. Maybe a Terminal shell script or something?


                         Haikus are easy
          But sometimes they don't make sense
                           Refrigerator

                Jasoco.netGeekPub Forums

Offline

 

#2 2009-04-12 5:00 pm

Mr. Happypants
Member
Registered: 2001-11-14
Posts: 1319

Re: Mount networked drives at bootup?

I have a Script at work to connect to the networked drives on startup. Sits in my Login items for the user, works like a charm!

Offline

 

#3 2009-04-12 5:08 pm

Jasoco
Your own personal Jesus
From: Doylestown, PA, USA, Earth
Registered: 2000-08-26
Posts: 8848
Website

Re: Mount networked drives at bootup?

That's the thing. What would the script look like and where would I put it to make it run then?

Is it a shell script?


                         Haikus are easy
          But sometimes they don't make sense
                           Refrigerator

                Jasoco.netGeekPub Forums

Offline

 

#4 2009-04-12 6:19 pm

Mr. Happypants
Member
Registered: 2001-11-14
Posts: 1319

Re: Mount networked drives at bootup?

Ahhhhh, I'll look at work tomorrow & post it, if nobody beats me to it. PM me if you don't see it shortly, I may wander off & forget. wink

Offline

 

#5 2009-04-12 6:50 pm

Jasoco
Your own personal Jesus
From: Doylestown, PA, USA, Earth
Registered: 2000-08-26
Posts: 8848
Website

Re: Mount networked drives at bootup?

Haha, okay. If no one posts it by tomorrow night I'll PM you. wink

Not a huge deal though, just would be nice to have.


                         Haikus are easy
          But sometimes they don't make sense
                           Refrigerator

                Jasoco.netGeekPub Forums

Offline

 

#6 2009-04-13 10:37 am

Mr. Happypants
Member
Registered: 2001-11-14
Posts: 1319

Re: Mount networked drives at bootup?

Here's the AppleScript I've got just for the 2 most commonly mounted servers:

Code:

tell application "Finder"
    mount volume "afp://192.168.200.70/Mac Server" as user name "name" with password "pass"
end tell

tell application "Finder"
    mount volume "afp://192.168.200.81/brisque01.2.0" as user name "name" with password ""
end tell

The second one connects sans password, so it's empty. Likewise, I'd imagine you can set them to connect as SMB as well. I added the script to my Login items for the user & it works like a charm. big_smile

Offline

 

#7 2009-04-13 2:47 pm

Jasoco
Your own personal Jesus
From: Doylestown, PA, USA, Earth
Registered: 2000-08-26
Posts: 8848
Website

Re: Mount networked drives at bootup?

That works perfectly. Except for how the Finder freezes for 10 seconds while it connects. I wonder if it could be done with a shell script that could run in the background as part of the Unix underpants instead of the GUI.

I'll put this in my Startup Items for now and give it a test.


                         Haikus are easy
          But sometimes they don't make sense
                           Refrigerator

                Jasoco.netGeekPub Forums

Offline

 

#8 2009-04-14 2:39 pm

Mr. Happypants
Member
Registered: 2001-11-14
Posts: 1319

Re: Mount networked drives at bootup?

I'm sure there's a better way, I generally restart & walk away to get a coffee or something so I don't notice if there's a delay. big_smile

Offline

 

#9 2009-04-14 3:04 pm

sturner
Royal High Poobah
Moderator
From: Carrollton, TX USA
Registered: 2000-01-31
Posts: 13768

Re: Mount networked drives at bootup?

I think there's a program out there for this.

bonjour mount

mount manager


I'm not dead yet.
There are 3 types of people, those who can count and those who can't.
"There are few things graven in stone, excepting your date of death."

Offline

 

Board footer

Powered by PunBB 1.2.6
© Copyright 2002–2005 Rickard Andersson