Posted on 08-11-2014 03:21 PM
I'm using a script to set the proxy for the Ethernet and Wi-Fi interfaces run at reboot. If I run the script manually it works great. Everything comes out set as it should. If I run it as part of the imaging workflow it will set the proxy for ethernet but fail to set it for the Wi-Fi interface. It's a pretty simple script. I can run it via policy, type it in, really any way other than as part of imaging, which is the one I want.
Anyone have any experience that would tell me what I can do to get a working networksetup script to work correctly as part of imaging for Wi-Fi?
Posted on 08-11-2014 03:23 PM
can you post the script?
how are you running the script in your imaging workflow? are you using casper imaging? firstboot packages? deploy studio?
Posted on 08-11-2014 03:44 PM
We use the following to set proxies for all Ethernet interfaces (incl. USB or Thunderbolt), Wireless & VPN.
Should be simple enough to adapt as needed: http://macmule.com/2011/09/09/how-to-change-the-automatic-proxy-configuration-url-in-system-preferen...
Posted on 08-12-2014 05:11 AM
We're using Casper Imaging, the script is part of the imaging workflow. The script is really just the networksetup command a few times over.
/usr/sbin/networksetup -setwebproxy "Wi-Fi" "our.proxy.com" "port#"
/usr/sbin/networksetup -setsecurewebproxy "Wi-Fi" "our.proxy.com" "port#"
/usr/sbin/networksetup -setwebproxy "Ethernet" "our.proxy.com" "port#"
/usr/sbin/networksetup -setsecurewebproxy "Ethernet" "our.proxy.com" "port#"
I like @bentoms script though, and may borrow some portions of it. However, I'm not sure it will actually change it's functionality. Ultimately it comes down to the same command. Maybe I'm wasting my time trying to get it to run during imaging and should just schedule it as policy.
"Wi-Fi" is the correct way to specify the particular network service right? I got it from running networksetup -listallnetworkservices, but it feels like such a sloppy way to reference an interface.
Posted on 05-28-2015 12:32 PM
Have you figured out how to accomplish this? I'm trying to do the same thing and using a similar script.
Posted on 05-28-2015 02:03 PM
@jleomcdo I never got it to work correctly as part of my imaging workflow. I ended up running it as a reoccuring check-in item daily.
Posted on 05-30-2015 06:24 AM
@jleomcdo & @jhuhmann When I used the above linked script, I use to run it at imaging as part of my postflight policy with no issues.