Subsequent scripts and rebooting

tatiang
New Contributor

I need to unbind a computer (via the Resource Kit's unbindOD.sh script) and
then change permissions (via a chmod shell script) on a folder, but the
folder is in /Users/Shared and only appears once the computer is unbound.

So, I want to create a policy that will run the unbind script, restart, and
then run the chmod script. What is the best way to set this up? Should I
use two policies, and if so, how can I be sure the second will run after the
first's restart? I currently have both policies set to run once at login.

Tatian



Tatian Greenleaf
Associate Director of Technology
Saint Mark's School
(415) 472-8000 x1014

1 REPLY 1

ernstcs
Contributor III

I like making my own StartupItems if something needs to happen after a reboot.

I’ve attached my recon startupitem as an example since it’s really simple. I use it after I run software updates. Reason being is that OS updates, as well as some others, don’t show as applied until a reboot, so a recon that just happens at the end of a install available software updates policy may not be accurate.

So make your policy that runs the unbind script, installs this StartupItem DMG, and then reboots.

The key to StartupItems are the permissions and making sure the name of the startup item is consistent.

This one is self deleting so it will only run once.

You can find more information about them here:

http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/Star...

Craig E