Verify FirstRun Scripts and Reboot

New Contributor III

We have built an image of 10.7.3 and complied it with the needed software. We have a few scripts that run at FirstRun after imaging that creates a user, joins our wireless network, sets time zone, and binds the computer to Active Directory. We would like to have some type of a prompt that ensures that these scripts run successfully. Is there anyway to do this at the login screen? We know we can open up Console and look at the jamf.log, but that takes some work. Another option we thought about was to write a script that would post the log file to a remote server for verification that everything ran smoothly. We have seen some discussion regarding using the JAMFHelper, but we aren't sure if this is the direction to take.

Our other issue is that we would like the computer to auto-reboot at the end of running the FirstRun scripts. What is the best way to automate this?



Esteemed Contributor
Esteemed Contributor

Eddie, as of 8.5.x the firstrun script includes a restart.

This will run after any scripts have.

Valued Contributor II

In 10.6.x, we used to have a jamf display message after our first run scripts ran to let the techs know the scipts were done, but the Lion login window doesn't allow this.

Our solution in 8.4 is to run a shutdown command at end of the post image script so the tech knows (we often image in batches and walk away to do other things), if they come back and machines are shut down, the imaging is done. They are then asked to turn machine on to confirm MCX settings have come down.

Not sure what an 8.5 restart will do to this workflow.

Contributor II

I have a script that runs as the last task before reboot to send an email to the imaging techs at the company. Article is here:

Code is here:```
(sleep 1; echo "helo <exchange server>"; sleep 1; echo "mail from: $DRIVENAME"; sleep 1; echo "rcpt to: "; sleep 1; echo "data"; sleep 1; echo "Subject: $DRIVENAME finishing imaging on $DATE at $TIME"; sleep 1; echo "Ready for data transfer and roll-down."; sleep 1; echo "."; sleep 1; echo "quit") | telnet <exchange server> 25

New Contributor III

I can verify that the enroll and first run scripts run, but bentoms, it doesn't auto-restart after the scripts run. I let it sit at the login screen for about 20 minutes and it won't restart. I looked at the and first run script, but neither had anything about restarting. It just mentioned the cleanup and deleting the scripts.