Skip to main content
Question

At Reboot Scripts

  • September 17, 2009
  • 5 replies
  • 0 views

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

Forum|alt.badge.img+21
  • Contributor
  • 1028 replies
  • September 17, 2009

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

No sure about the loginwindow piece.

Craig E


  • 0 replies
  • September 17, 2009

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


John_Wetter
Forum|alt.badge.img+31
  • Contributor
  • 328 replies
  • September 17, 2009

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


  • 0 replies
  • September 17, 2009

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


Forum|alt.badge.img+31
  • Honored Contributor
  • 2721 replies
  • September 17, 2009

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings