Here's what we're using. Basically it grabs the name of the 3rd connection
slot from dscl, which will be Ethernet on machines with 2 ethernet ports. If
it finds ŒEthernet' it sets for en0 and en1. Otherwise it sets for en0 and
airport.
Bob
You could modify the script to a case statement like this:
case `system_profiler SPHardwareDataType | awk '/Model Name:/ { print
$3 }'` in
iMac* )) do the proper commands;;
Macbook* )) do the proper commands;;
Mac Pro* )) do the set of commands;;
esac
Then you would just need one script. Though if you have a mixed
environment of 10.5 and 10.6 the network setup commands are also
different. You may need to add OS detection to your script.
-Tom
I'll send you what I used this weekend. It let's you set a proxy PAC file
for safari and chrome. For firefox, you may as well modify and re-package.
I'll send you those instructions as well.
Sent from Ken's iPhone
Here you go as promised... a bit late though.
The setAutoProxy.sh script is just modified from a script written by JAMF
from the resource kit. I modified it to set the proxy pac file on wireless
and wired interfaces. It is attached in a zip file.
Firefox is a bit more difficult; you'll have to do a bit of trial and error
to get it right. There is some decent documentation on the web if you
lookup "firefox lockpref". I had a bit of difficulty getting it to work in
the latest version. Basically you write a file of the prefs you want (java
formatted) and specify it in the all.js file within the app. Next you have
to byteshift the config file you wrote using either an online byteshifting
script page, or there is a good perl script for this out there as well.
When you launch Firefox, it will lock down whatever prefs you write into
your custom config. To deploy, I suppose you could just push out the files
required... I prefer just re-packaging a copy of the App that is already
functioning.
Here is an example of mozilla.cfg or whatever you want to call it. This is
the file you would byteshift 13 (I've attached a script for this as well):
//
// Proxy Settings
lockPref("network.proxy.type", 2);
lockPref("network.proxy.autoconfig_url", "
http://yourcompany/path/ssi_pac.pac");;)
// HomePage Settings
lockpref("browser.startup.page", 1);
lockPref("browser.startup.homepage", "http://yourcompany.com");
Now that you have this file, you have to byteshift it and place it in
/Applications/Firefox.app/Contents/MacOS/whateverfilename.cfg. After this
step, edit /Applications/Firefox.app/Contents/MacOS/greprefs/all.js with
your favorite editor and add:
pref("general.config.filename", "whateverfilename.cfg");
I may have left out some steps, but do a search online and you'll figure it
out in no time.
Have fun, and let me know if you have any questions.
Thanks,
Ken