Skip to main content
Answer

Imaging on reboot run Script before PKG

  • May 20, 2016
  • 4 replies
  • 12 views

Forum|alt.badge.img+9

Hi,

Imaging question!
I have a script I need to run BEFORE a package is installed.

Both the package and the script need to be run "at reboot" (install on boot drive after imaging). The script isn't technically related to the package, but performs some necessary work otherwise the package fails.

As far as I can tell, I can only get the package to run before the script - and not vice versa. It seems "at reboot" settings process all PKGs first?

What's the best way to accomplish this?

Thanks!

Best answer by tthurman

You should be able to add scripts to packages created by Casper Composer. I just did a quick test with a post-flight script. Seems to work alright.

4 replies

Forum|alt.badge.img+14
  • Valued Contributor
  • May 20, 2016

As far as I know there isn't away to specifically run a script before hand. My suggestion is to create a package that runs a script and put it's priority really low. (I haven't tested this - but I assume it would work.)

--
TJ


Forum|alt.badge.img+9
  • Author
  • Contributor
  • May 20, 2016

OK, I can give that a go. Pre-flight might also be an option if I edit the package?


Forum|alt.badge.img+14
  • Valued Contributor
  • Answer
  • May 20, 2016

You should be able to add scripts to packages created by Casper Composer. I just did a quick test with a post-flight script. Seems to work alright.


rqomsiya
Forum|alt.badge.img+12
  • Honored Contributor
  • May 20, 2016

Another option is to use Packages.app

It allows you to add pre and post-flight scripts. I do it all the time.