Delaying Login Items

jmltapp1971
New Contributor

Hi

We have setup our main mapped drives to run as Login Items, which is working very well for machines on a Cat 5 connection. However on the Airs and Pros we are experiencing issues where our corporate wireless is too slow connecting compared to the login items running to allow a network connection to be present.

Therefore all the mapped drives that our ex-Window users are used to all error out and dont connect.

Is there anyway to delay the launch of these items for a set time after boot, or if possible to setup wireless so that it connects if available at the login screen not after?

Many thanks for any help.

Jason

4 REPLIES 4

nessts
Valued Contributor II

put a check in your script to ensure the server is available (ping, DNS lookup, smbclient list, etc) before mount and if it is not, then wait for a bit and test again.

nessts
Valued Contributor II

oh, i guess that is assuming you are using a script to mount those, now that i look at it, I am guessing you just dragged the icon into login items or something? change it to a launch agent and make a script mount them. that is discussed on JAMFnation oodles of times.

mm2270
Legendary Contributor III

You can have the servers connect via a LaunchAgent and script rather than as login items. By doing this you'll be able to set up a check in the script that will first see if the network is available before it tries to connect to the server shares, and if not, either loop for a few seconds and try again (to a limited number of times) or just exit.

You can take a look at what @bentoms has already on his blog for this here, though I'm not sure if that's the most current link. Pretty sure this will work or can be adapted for what you're trying to do here.

jmltapp1971
New Contributor

Thanks Guys

I ended up using @bentoms script (which works really well) through Automator with a pause in front. It still hates my DFS share over wireless but that is another issue for another time :)