In the past, people have submitted hints on how to get their Macs to start internet sharing automatically at boot. All of them are either editing files in hidden directories or creating a StartupItem to do the task. Most people may not want to edit files that are for the system, and Leopard and later versions of OS X use LaunchDaemons, not StartupItems to run scripts or executables at boot.
I created a LaunchDaemon plist based on the composition of the iStat Server's LaunchDaemon plist to run the InternetSharing executable automatically at boot. Here's what it looks like:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Disabled</key> <false/> <key>GroupName</key> <string>wheel</string> <key>UserName</key> <string>root</string> <key>KeepAlive</key> <true/> <key>Label</key> <string>InternetSharing</string> <key>OnDemand</key> <false/> <key>Program</key> <string>/usr/libexec/InternetSharing</string> <key>RunAtLoad</key> <true/> <key>StartOnMount</key> <false/> </dict> </plist>
Mac OS X Hints
http://hints.macworld.com/article.php?story=2009110114123254