Issue with running a "before" script in a policy (triggers reboot prematurely)

donmontalvo
Esteemed Contributor III

We're having a problem with a policy we created that does the following:

  1. Runs a "before" script (zip and then remove /Library/ColorSync/Profiles folder).
  2. Installs AAMEE generated uber-package (13 GB *.pkg).
  3. Reboots computer

The script has "exit 0" at the end, which should allow the policy to then run the pkg. Rolling over the policy shows the above happens in order. Well, for some reason, the computer is rebooting after the script runs. Is anyone else seeing this issue, where running a "before" script on a policy that is set to reboot the computer doesn't install the policy, but instead runs the script and reboots?

Thanks,
Don

--
https://donmontalvo.com
2 REPLIES 2

tlarkin
Honored Contributor

maybe you should use the run command to reboot, as the run command should run after the policy is executed, ie at the end.

donmontalvo
Esteemed Contributor III

Thanks, worked like a charm!

--
https://donmontalvo.com