[Casper] after image, first time run scripts
Miles Leacy
miles.leacy at themacadmin.com
Mon Dec 15 12:06:49 PST 2008
To make a script run once as you describe, I'd run the script via a policy,
once per computer, at login. Is it a requirement for it to run at login? If
not, I'd run it at reboot. If you don't have "Create Login/Logout Hooks"
checked in Management Preferences on your JSS, you should be able to set the
script up as a login script for your admin account. If you want it to
delete itself you could include the line "rm /path/to/this/script.bash" in
your script. If you run it as a policy, there's no need for self-delete.
The networksetup command will allow you to turn your ethernet interfaces and
Airport card on and off.
Recon:
I suggest the jamf binary. Type `jamf help recon` in Terminal. There are
several switches and parameters depending on exactly what you want. Then
again, with a policy, you could simply check the box in the Advanced tab.
If you want logs, you can include "echo `ifconfig -a`" to the "Run Command"
field in the Advanced tab of your policy (or, more simply `networksetup
-listallnetworkservices`).
Is this MAC-registering software running locally on the client machines?
MAC addresses generally don't change, and if you're going to run the
software on these boxes, they're eventually going to register the MAC
address. Perhaps I don't understand what are you trying to accomplish or
avoid. Can you elaborate? In your workflows, when do you expect a local
admin to log on? After imaging, but before deployment?
It should go without saying that with both airport and ethernet disabled,
the only way you'll be able to interact with this machine, until the script
runs, is at the console.
----------
Miles A. Leacy IV
Certified System Administrator 10.4
Certified Technical Coordinator 10.5
Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com
2008/12/15 Thomas Larkin <tlarki at kckps.org>
> Hello everyone,
>
> I am looking for a way to automate a few things after a machine gets
> imaged. By default in our image both the Airport and the NIC are turned
> off. They are turned off because we use certain software packages that will
> register MAC address upon first launch. So, I would like to create a script
> that just runs once when the local admin logs in to a machine for the first
> time. I was looking at the scripts that run after imaging, but there is no
> log to see if they work, and I want to do a few things after imaging is
> done.
>
> 1) power on airport and ethernet
>
> 2) bind client to specified replica
>
> 3) run recon
>
> Thoughts on this process? I want the script to run once and then never
> run again, perhaps even delete itself and only run after the imaging
> process.
>
> ___________________________
> Thomas Larkin
> TIS Department
> KCKPS USD500
> tlarki at kckps.org
> blackberry: 913-449-7589
> office: 913-627-0351
>
>
>
>
>
>
> _______________________________________________
> Casper mailing list
> Casper at list.jamfsoftware.com
> http://list.jamfsoftware.com/mailman/listinfo/casper
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20081215/135276f9/attachment.html
More information about the Casper
mailing list