Before script seems to run at end of policy

dpertschi
Valued Contributor

I'm stumped on one thing that's preventing me from moving to a policy based new machine deployment process.

My deployment policy has about 25 packages and scripts. I have two before scripts that must run first. The first one is simply a jamfHelper full screen curtain, the second is a script that renames the machine to it's serial number.

The problem is, according to the client side logs, that the machine is not getting renamed until the very end of the policy; which is interfering with the AD binding (Casper AD binding).

5 REPLIES 5

stevewood
Honored Contributor II
Honored Contributor II

@dpertschi how are you installing the packages and scripts? Are they separate policies that are running, or are they part of the configuration?

I moved everything to follow the Oxford model, which is one first boot script that does everything. All of the software installs are setup as policies and the first boot script calls the policies by policy ID.

Perhaps moving to this type of model would work. You could rename the computer at the top of the script, then bind at the end of the script. In the middle would be all of your configuration steps and your software installs.

dpertschi
Valued Contributor

One policy with all the goods... http://tinyurl.com/k9nxz2q

Josh_S
Contributor III

@dpertschi][/url

One thing I've seen in the past is people changing the before/after settings using Casper Admin, expecting that change to flow down to the policies that include those scripts. It's helpful to think of the before/after settings attached to a script as defaults. Defaults that can be overridden in individual policies.

Check to make sure that the policy that is running these scripts has the correct settings for the scripts.

Josh_S
Contributor III

@dpertschi

Looking at your picture that doesn't seem to be the case. I'm curious though, what happens if you remove the '$' from the script 'fsNotice$4.sh'? I personally try to avoid special characters in file names just to be on the safe side.

dpertschi
Valued Contributor

I'm using the $4 parameter in that first script, and named such as an obvious reminder to myself when adding to a policy. Not necessary, no, but it works ok.

So the setComputerName script does have a default priority of After as viewed in Casper Admin. In this policy, it's set to Before.

I'm making a payload free package for it now, will try it that way and prioritize it up to first place.