We've had an on going issue with factory fresh Macs that are netbooted, Casper imaged with a thin configuration, and not having a working network connection after the first reboot. All of the apps and settings are installed perfectly. But without the working network connection, many systems being deployed to the end user that are not bound to the domain, which then leads to calls to the Help Desk.
At first, we thought it was because the Mac wasn't obtaining a IP address quick enough post boot. But it appears that it's more likely that with the full screen jamfhelper and/or the temp account that is used to login At Reboot, the Network panel isn't adding the removable network adapter.
I was going to create a first boot script that checked for a working network connection or halted until the tech ensured the thunderbolt or usb ethernet adapter was detected and had a valid IP address. Instead, I came up with the following script that appears to work and covers if the laptop arrives with either type of removable network adapter. I also think it retains the model specific service orders. The script is the first script to run after reboot.
(Casper versions 7.x ~ 9.21, OS X 10.6 ~ 10.9.0)
#!/bin/sh
##########################################################################################
# Create time date stamped log
##########################################################################################
logFile="/private/var/log/OurCompany.log"
log () {
/bin/echo $1
/bin/echo $(date "+%Y-%m-%d %H:%M:%S: ") $1 >> $logFile
}
log "-----"
log "Begin script 100_resetNetworkLocationAndPorts.sh"
log "Adjust Network Locations to correctly add network ports"
sleep 5
##########################################################################################
# Create a temporarily Network location and recreate the Automatic location.
##########################################################################################
networksetup -createlocation TempLoc populate
sleep 5
networksetup -switchtolocation TempLoc
sleep 2
networksetup -deletelocation Automatic
sleep 2
networksetup -createlocation Automatic populate
sleep 5
networksetup -switchtolocation Automatic
sleep 5
networksetup -deletelocation TempLoc
log “Network Location Setup Completed.”
exit 0
Is there a better way to ensure the network interfaces are set properly for each Mac model and variations of network interfaces?