Search code examples
linuxenvironment-variablesizpack

IZPack Setting Linux Environment Variables


I am sure this has to be out there somewhere, but after about a day of searching I am stuck. I am trying to use IZPack to do an installation on Linux and trying to call a shell script that sets some environment variables. However I don't know how to "source" the script instead of just running it. Running the script using:

<executable type="bin" stage="postinstall" targetfile="$INSTALL_PATH/myscript.sh" os="unix"/>

This only executes the script, it does not source it. So all exports of ENV variables are lost once the script completes.

How can I source my scripts from IZPack instead of just running them?


Solution

  • IMHO you simply cannot influence the shell environment your Java process of your IzPack installer is running in from that process itself.