%post
command. If your kickstart file also includes a %pre
section, the order of the %pre
and %post
sections does not matter.
Note
%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
--nochroot
/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
--log /path/to/logfile
--nochroot
option. For example, without --nochroot
:
%post --log=/root/ks-post.log
--nochroot
:
%post --nochroot --log=/mnt/sysimage/root/ks-post.log
Example 15.1. Run a script named runme
from 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
-o nolock
is required when mounting an NFS mount.