At Reboot Scripts

Not applicable

Is there a way to force the order of at reboot scripts? I have two scripts that run at first boot, one that resets the policy history, and one that runs a firstRun trigger, which runs a few policies that will create an account, install parallels, and a few other things.

However, it appears that the firstRun trigger runs before the clear policy history, so some policies aren't running that need to, and on brand new machines, I don't see any policies getting applied, but the results are there.

Can I force the order, or run the flushPolicyHistory Before casper imaging runs?

On a related note, is there anyway to restart the loginwindow after you create a user, I kill and reopen loginwindow as part of the policy that creates the user, but it doesn't seem to work unless I do it manually after the machines is fully booted.

-Robert

5 REPLIES 5

ernstcs
Contributor III

I want to say the At Reboot scripts can be ordered alphabetically?

No sure about the loginwindow piece.

Craig E

Not applicable

Also numerically naming the scripts 01, 02 etc...

John_Wetter
Release Candidate Programs Tester

Yep, at all of the stages (Before), (After), and (At Reboot), within each of
those, they are alphabetical.

Thanks,
John

-- John Wetter
Technology Support Administrator
Educational Technology, Media & Information Services
Hopkins Public Schools
952-988-5373

Not applicable

Thanks for all the replies.

In testing I've also figured out the loginwindow thing too...I think. I have LoginWindow, when it needed to be loginwindow.

Hopefully that works.

-Robert

tlarkin
Honored Contributor

Or, you can just write one script that runs everything and have the script invoke custom trigger Casper policies.

For example...

#!/bin/bash

some commands....

/usr/sbin/jamf policy -trigger myfirstitem

/usr/sbin/jamf policy -trigger my2nditem

so on and so forth, then you can just have that run the scripts in whatever order you want.