English Urdu (Pakistan)
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:
[command]#%include /tmp/part-include#
The partitioning commands selected in the script will be used.
Example Post-installation Script
The following is an example [command]#%post# section:
Sample %post Script
# Start of the %post section with logging into /root/ks-post.log
%post --log=/root/ks-post.log
# Mount an NFS share
mkdir /mnt/temp
mount -o nolock 10.10.0.2:/usr/new-machines /mnt/temp
openvt -s -w -- /mnt/temp/runme
umount /mnt/temp
# End of the %post section
%end
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.