The translation is temporarily closed for contributions due to maintenance, please come back later.
English Korean
If you configured the network with static IP information, including a name server, you can access the network and resolve IP addresses in the [command]#%post# section. If you configured the network for `DHCP`, the `/etc/resolv.conf` file has not been completed when the installation executes the [command]#%post# section. You can access the network, but you cannot resolve IP addresses. Thus, if you are using `DHCP`, you must specify IP addresses in the [command]#%post# section.
The following options can be used to change the behavior of post-installation scripts. To use an option, append it to the [command]#%post# line at the beginning of the script. For example:
Any scripting language available on the system can be used; in most cases, these will be `/usr/bin/sh`, `/usr/bin/bash`, and `/usr/bin/python`.
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.
Logs the script's output into the specified log file. Note that the path of the log file must take into account whether or not you use the [option]#--nochroot# option. For example, without [option]#--nochroot#:
The following is an integrated example showing the [command]#clearpart#, [command]#zerombr#, [command]#part#, [command]#raid#, [command]#volgroup#, and [command]#logvol# Kickstart options in action:
This advanced example implements LVM over RAID, as well as the ability to resize various directories for future growth.
First, the [command]#clearpart# command is used on drives `hda` and `hdc` to wipe them. The [command]#zerombr# command initializes unused partition tables.
Then, the two drives are partitioned to prepare them for RAID configuration. Each drive is divided into five partitions, and each drive is partitioned into an identical layout.
The next part uses these pairs of physical partitions to create a software RAID device with RAID1 level (mirroring). The first four RAID devices are used for `/` (root), `/safe`, `swap` and `/usr`. The fifth, largest pair of partitions is named `pv.01` and will be used in the following part as a physical volume for LVM.
Finally, the last set of commands first creates a volume group named `sysvg` on the `pv.01` physical volume. Then, three logical volumes (`/var`, `/var/freespace` and `/usr/local`) are created and added to the `sysvg` volume group. The `/var` and `/var/freespace` volumes have a set size of 8 GB, and the `/usr/local` volume uses the [option]#--grow# option to fill all remaining available space.
The above example uses identifiers `hda` and `hdc` to identify disk drives. You should use unique identifiers, such as a disk labels or an UUIDs, to identify disk drives. See the note in introduction to this appendix.
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 following line:
The above example mounts an NFS share and executes a script named `runme` located at `/usr/new-machines/` on the share. Note that NFS file locking is *not* supported while in Kickstart mode, therefore the [option]#-o nolock# option is required.