Can a 'before' script cancel Casper Imaging?

robo
New Contributor III
New Contributor III

I'm working on a script to perform some disk partitioning, to be run before the main Casper Imaging tasks in the AutoRun workflow. There are certain conditions where the script will exit with an error, but as far as I know, Casper Imaging will then continue to try to perform the rest of the imaging.

Is there a way to have the script tell Casper Imaging to stop/fail gracefully?

One option would be for the script to kill the Casper Imaging process, but that seems a bit brutal.

5 REPLIES 5

jarednichols
Honored Contributor

So you're trying to partition before firing off Casper Imaging? You could just have a stand-alone scripting running diskutil and then either it continues and opens Casper Imaging or exits with error.

robo
New Contributor III
New Contributor III

-duplicate-

robo
New Contributor III
New Contributor III

-duplicate-

robo
New Contributor III
New Contributor III

Thanks - that could work, but then we would lose being able to enable/disable the partitioning script by the 'Automatically Image this Computer the next time Casper Imaging is launched' autorun parameter (unless there's a way to get that info from an http query to the JSS...)

jarednichols
Honored Contributor

Ah yes. You'd lose that. I'm not sure if there's a good way to get what you're after then. You may need to decide on which features are must haves and which are nice-to-haves.