Chapter 31. Kickstart Installations
322
echo "part /home fstype ext3 size 2048 grow" >> /tmp/partinclude
fi
This script determines the number of hard drives in the system and writes a text file with a different
partitioning scheme depending on whether it has one or two drives. Instead of having a set of
partitioning commands in the kickstart file, include the line:
%include /tmp/partinclude
The partitioning commands selected in the script are used.
Note
The pre-installation script section of kickstart
cannot
manage multiple install trees or
source media. This information must be included for each created ks.cfg file, as the pre-
installation script occurs during the second stage of the installation process.
31.7. Post-installation Script
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. This section is
useful for functions such as installing additional software and configuring an additional nameserver.
Note
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/resolv.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.
Note
The post-install script is run in a chroot environment; therefore, performing tasks such as
copying scripts or RPMs from the installation media do not work.
--nochroot
Allows you to specify commands that you would like to run outside of the chroot environment.
The following example copies the file
/etc/resolv.conf
to the file system that was just
installed.
%post nochroot cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
--interpreter
/usr/bin/python
Allows you to specify a different scripting language, such as Python. Replace
/usr/bin/python
with the scripting language of your choice.
Содержание ENTERPRISE LINUX 5 - VIRTUAL SERVER ADMINISTRATION
Страница 12: ...xii ...
Страница 20: ......
Страница 30: ...12 ...
Страница 32: ...14 ...
Страница 82: ...64 ...
Страница 106: ...88 ...
Страница 122: ...104 ...
Страница 124: ...106 ...
Страница 126: ......
Страница 132: ...114 ...
Страница 168: ...150 ...
Страница 182: ...164 ...
Страница 192: ...174 ...
Страница 194: ......
Страница 236: ...218 ...
Страница 238: ...220 ...
Страница 270: ......
Страница 274: ...256 ...
Страница 278: ...260 ...
Страница 292: ...274 ...
Страница 294: ......
Страница 300: ...282 ...
Страница 304: ......
Страница 316: ...298 ...
Страница 357: ...Creating Partitions 339 Figure 32 7 Creating a Software RAID Device 4 Click OK to add the device to the list ...
Страница 370: ...352 ...
Страница 384: ...366 ...
Страница 385: ...Part VII Appendix ...
Страница 386: ......