Red Hat LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE Manual page 44

Hide thumbs Also See for LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE:
Table of Contents

Advertisement

44
command. Note that you can access the network in the %pre section; however, name service has not
been configured at this point, so only IP addresses will work. Here's an example %pre section:
%pre
# add comment to /etc/motd
echo "Kickstart-installed Red Hat Linux '/bin/date'" > /etc/motd
# add another nameserver
echo "nameserver 10.10.0.2" >> /etc/resolv.conf
This section creates a message-of-the-day file containing the date the kickstart installation took place.
It also gets around the network command's limitation of only one name server by adding another
nameserver to /etc/resolv.conf.
Note that the pre-install script is not run in the change root environment.
1.5.31 %post — Post-Installation Configuration Section
You have the option of adding commands to run on the system once the installation is complete. This
section must be at the end of the kickstart file and must start with the %post command.
If you configured the network with static IP information, including a
nameserver, you can access the network and resolve IP addresses in the
%post section. If you configured the network for DHCP, the /etc/re-
solv.conf file has not been completed when the installation executes the
%post section. You can access the network, but you can not resolve IP
addresses. Thus, if you are using DHCP, you must specify IP addresses in
the %post section.
Here's an example %post section that creates a message of the day file containing the date that the
kickstart installation took place, and gets around the network command's limitation of one name-
server only by adding another nameserver to /etc/resolv.conf.
%post
# add comment to /etc/motd
echo "Kickstart-installed Red Hat Linux '/bin/date'" > /etc/motd
Chapter 1:Kickstart Installations
Note
Note

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linux 7.2

Table of Contents