Posted on 05-31-2017 08:48 AM
I created a pretty generic script to run defaults commands with the intention that the arguments would do all the work. If I create a policy that has that script specified several times, every instance of the script uses the arguments of the first one. I would've thought that if I added a script several times that it would let me specify different arguments.
Is this a bug?
Posted on 05-31-2017 09:07 AM
Try to create ingremented duplicates of the script you want to run twice or more times in a policy. Something like
Preferences01.sh
Preferences02.sh
.
.
.
I heard something about this bug some time ago, but not that shure.
Posted on 05-31-2017 09:12 AM
Hey James,
That does look to be a current Product Issue. I'd suggest creating a case with Support and they can tie the case to the Product Issue to bring more impact to it.
Posted on 05-31-2017 09:52 AM
Ok I'll create a bug.
Posted on 05-31-2017 02:52 PM
As far as I know it's always behaved like this, there is almost certainly a feature request around somewhere asking for it to be changed.
Rather than having several seperate scripts it's probably cleaner and easier to have linked policies (or sequentially named ones).
You can create several policies each with the script with different arguments all set to the same custom trigger, you make one
jamf policy -event "CUSTOMTRIGGER"
call from a main policy.
Posted on 06-02-2017 09:37 AM
There's lots of ways around this problem but I'm striving to keep my policy list as short as possible, and having multiple policies that really should be one just makes it a mess. It also cripples the power of generalized scripts.
Posted on 06-28-2017 03:31 PM
I'm currently in the same boat with you @jamesreynolds , did support have any suggestions?