Figure 33.13. Pre-Installation Script
You can add commands to run on the system immediately after the kickstart file has been parsed and before the installation begins. If you have configured the network in the kickstart file, the network is enabled before this section is processed. To include a pre-installation script, type it in the text area.
The version of anaconda in previous releases of Red Hat Enterprise Linux included a version of busybox that provided shell commands in the pre-installation and post-installation environments. The version of anaconda in Red Hat Enterprise Linux 6 no longer includes busybox, and uses GNU bash commands instead.
To specify a scripting language to use to execute the script, select the Use an interpreter option and enter the interpreter in the text box beside it. For example,
/usr/bin/python2.6 can be specified for a Python script. This option corresponds to using
%pre --interpreter /usr/bin/python2.6 in your kickstart file.
Do not include the
%pre command. It is added for you.
The pre-installation script is run after the source media is mounted and stage 2 of the bootloader has been loaded. For this reason it is not possible to change the source media in the pre-installation script.