[Casper] scripts and $ parameters

Clinton Blackmore clinton.blackmore at westwind.ab.ca
Wed Apr 8 07:07:18 PDT 2009


When Casper executes your script, it will call it like this:

./yourscript [param1] [param2] [param3] [your-param4] [your- 
param5] ... [your-param11]

You can just use $4 in your script to access the value you placed  
there in the policy.  You may need to put the value in the policy in  
quotes -- try it both ways.  Also, a good script should make sure it  
has a value if it needs one, just in case the person who set up the  
policy forgot to provide it.

A great script for seeing what happens when you populate parameters is  
the BashExample.sh test script that you may've installed with Casper.   
I have attached the file for you.

Cheers,
Clinton


On 8-Apr-09, at 6:27 AM, Criss Myers wrote:

> Hi Guys
>
> Im trying to create a script where I can use the Casper $4 - $11  
> parameters.
>
> Ive created a script that works locally and i want to substitute one  
> of the parameters with $4 so that i can then add that parameter in  
> Casper Remote when i use the script.
>
> Ive add the script to Casper Admin and then in Casper Admin given $4  
> parameter a name.
>
> I then go into Casper Remote, select the script and put my value in  
> the named parameter, what else do i need to do to get the script to  
> work?
> In the script do i just substitute my value for $4, or do i need to  
> add some other code to take that value from Casper?
>
> Criss
>
> Criss Myers
> Senior Customer Support Analyst (Mac Services)
> Apple Certified Technical Coordinator v10.5
> LIS Business Support Team
> Library 301
> University of Central Lancashire
> Preston PR1 2HE
> Ex 5054
> 01772 895054
>
> _______________________________________________
> Casper mailing list
> Casper at list.jamfsoftware.com
> http://list.jamfsoftware.com/mailman/listinfo/casper


This email has been scanned by Barracuda Network's Anti-Virus and Spam Firewall.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20090408/76b7287e/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BashExample.sh
Type: application/octet-stream
Size: 1369 bytes
Desc: not available
Url : http://list.jamfsoftware.com/pipermail/casper/attachments/20090408/76b7287e/attachment.obj 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20090408/76b7287e/attachment-0001.htm 


More information about the Casper mailing list