Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 24 lines (18 sloc) 1 KB
# Stolen from PSU:
echo "Waiting for network access"
/usr/sbin/scutil -w State:/Network/Global/DNS -t 180
sleep 5
# Get the serial number
serial=`system_profiler SPHardwareDataType | awk '/Serial/ {print $4}'`
# If this is a VM in VMWare, Parallels, or Virtual Box, it might have weird serial numbers that Puppet doesn't like, so change it to something static
if [[ `system_profiler SPHardwareDataType | grep VMware` || `system_profiler SPHardwareDataType | grep VirtualBox` || `system_profiler SPEthernetDataType | grep "/0x1ab8/"` ]]; then
# Remove any silly + or / symbols
/usr/sbin/scutil --set HostName "$"
/usr/sbin/scutil --set LocalHostName "$"
/usr/sbin/scutil --set ComputerName "$"
/usr/bin/puppet agent --test --waitforcert 60 >> /var/log/puppetagent.log
/usr/bin/touch /Users/Shared/.com.googlecode.munki.checkandinstallatstartup