Firstboot Script Commands

From AFP548 Wiki
Revision as of 10:07, 9 July 2010 by Nate (Talk) (Created page with '<syntaxhighlight lang="bash"> #!/bin/bash #System Setup #Time Zone Setup systemsetup -settimezone America/New_York #Set to use Network Time Server time.apple.com systemsetup -s...')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
#!/bin/bash
#System Setup
 
#Time Zone Setup
systemsetup -settimezone America/New_York
 
#Set to use Network Time Server time.apple.com
systemsetup -setusingnetworktime on
systemsetup -setnetworktimeserver time.apple.com
 
#Update NTP
sudo ntpdate -bvs time.apple.com
 
#Disable Time Machine "use this disk"
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool YES
 
#Enable ARD for admin
kick="/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart"
$kick -activate -configure -access -on -users 'admin' -privs -all -restart -agent
#Start Remote Login (Or this can be done using a preflight script on the firstboot script installer.)
sudo /sbin/service ssh start
 
#disable ipv6
networksetup -setv6off Ethernet
 
#Reboot in 1 minute
sleep 60
sudo reboot
 
 
#Self Destruct
#srm "$0"
mv $0 $0.done