Scripts running before target drive is erased?

endor-moon
Contributor II

Hi Folks, I'm still new to Casper Suite after using Mike Bombich's netrestore for years and more recently, Deploy Studio. I've been testing image with Casper on a fairly basic image that consists of OS X 10.9.5 as created by AutoDMG with a few scripts and so forth.2b31bf76cda94184993a0310c26a336f
Looking at the screen shot (above), it appears the scripts are being executed before the hard drive is erased. I can't see how that would work at all. Do I have to do something clever to get the scripts to execute on reboot? I am using Casper 9.72. I see another choice is 'after'. Does that mean after all other tasks during imaging? Thanks.

1 ACCEPTED SOLUTION

endor-moon
Contributor II

It turns out I had to delete all the scripts inside Casper and create them again. I think this has something to do with the scripts sitting there through various version upgrades. I read something about this elsewhere on this site. Works fine now.

View solution in original post

5 REPLIES 5

bentoms
Release Candidate Programs Tester

@endor-moon Yes try AFTER.

Another option is "At Restart" but that depends on your workflow.

endor-moon
Contributor II

0805fc89baf548be91192e3501649313
I had everything on at restart or reboot and now set it all to 'after' but still no luck. I'm compiling into an image if that makes a difference. I found once you start compiling these, they ignore changes unless you re-compile, which is reasonable, but I don't see how to go back to a pre-compiled workflow once you start down that path. Another new thing to absorb. ;)

lwindram
Contributor

I have had success ensuring that scripts run after reboot by building script / LaunchDaemon pairs and installing them as a dmg. Imaging sorts package installation using the assigned "Priority", so they will always install after the Erase HD process.

It does involve more legwork as you will have to write the LaunchDaemons and package the combo.

Take a look at @rtrouton's github for a sample.

endor-moon
Contributor II

It turns out I had to delete all the scripts inside Casper and create them again. I think this has something to do with the scripts sitting there through various version upgrades. I read something about this elsewhere on this site. Works fine now.

bentoms
Release Candidate Programs Tester

@endor-moon odd issue. But thanks for sharing the solution. I'll keep an eye out for it.