Hi Folks,
I have written a launchdaemon and I believe it is executing on first boot. However, I would like to wait until the second boot, as first boot after Casper Imaging, Casper is running its own tasks and I suspect the system is being restarted before my tasks are complete. How do I detect Casper's post-boot activity to avoid this conflict?
Here is the code of my launchdaemon. I called it com.orgname.firstboot instead of my actual institution's name just for illustration here. [Edited this post and removed LaunchOnlyOnce switch. I got some excellent feedback on that already.]
<?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>Label</key>
<string>com.orgname.firstboot</string>
<key>Disabled</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/Library/AdminToolBox/on-firstboot.sh</string>
</array>
</dict>
</plist>