%post command. If your kickstart file also includes a %pre section, the order of the %pre and %post sections does not matter.
%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.
--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/usr/bin/python with the scripting language of your choice.
--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
%post --log=/root/ks-post.log
wget -O- http://proxy-or-sat.example.com/pub/bootstrap_script | /bin/bash
/usr/sbin/rhnreg_ks --activationkey=<activationkey>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.
--autosubscribe option automatically subscribes the new system to the best-matched subscription pool available after registering it with the entitlements service.
%post --log=/root/ks-post.log /usr/sbin/subscription-manager register --username rhn_username --password rhn_password --autosubscribe