11.01.2015 Views

Red Hat Enterprise Linux Installation Guide 5.2 - linux.meuhobby.com

Red Hat Enterprise Linux Installation Guide 5.2 - linux.meuhobby.com

Red Hat Enterprise Linux Installation Guide 5.2 - linux.meuhobby.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 28. Kickstart <strong>Installation</strong>s<br />

or source media. This information must be included for each created ks.cfg file,<br />

as the pre-installation script occurs during the second stage of the installation<br />

process.<br />

7. Post-installation Script<br />

You have the option of adding <strong>com</strong>mands to run on the system once the installation is<br />

<strong>com</strong>plete. This section must be at the end of the kickstart file and must start with the %post<br />

<strong>com</strong>mand. This section is useful for functions such as installing additional software and<br />

configuring an additional nameserver.<br />

Note<br />

If you configured the network with static IP information, including a nameserver,<br />

you can access the network and resolve IP addresses in the %post section. If<br />

you configured the network for DHCP, the /etc/resolv.conf file has not been<br />

<strong>com</strong>pleted when the installation executes the %post section. You can access the<br />

network, but you can not resolve IP addresses. Thus, if you are using DHCP, you<br />

must specify IP addresses in the %post section.<br />

Note<br />

The post-install script is run in a chroot environment; therefore, performing tasks<br />

such as copying scripts or RPMs from the installation media do not work.<br />

--nochroot<br />

Allows you to specify <strong>com</strong>mands that you would like to run outside of the chroot<br />

environment.<br />

The following example copies the file /etc/resolv.conf to the file system that was just<br />

installed.<br />

%post --nochroot cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf<br />

--interpreter /usr/bin/python<br />

Allows you to specify a different scripting language, such as Python. Replace<br />

/usr/bin/python with the scripting language of your choice.<br />

304

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!