28.7.1. 范​例​

28.7.1. 范​例​

向​红​帽​网​络 Satellite 注​册​:

%post
( # Note that in this example we run the entire %post section as a subshell for logging.
wget -O- http://proxy-or-sat.example.com/pub/bootstrap_script | /bin/bash
/usr/sbin/rhnreg_ks --activationkey=<activationkey>
# End the subshell and capture any output to a post-install log file.
) 1
>/root/post_install.log 2
>&1

从 NFS 共​享​目​录​运​行​叫 runme 的​命​令​:

mkdir /mnt/temp 
mount -o nolock 10.10.0.2:/usr/new-machines /mnt/temp open -s -w -- 
/mnt/temp/runme 
umount /mnt/temp

注​记​

kickstart 模​式​不​支​持 NFS 文​件​锁​定​,因​此​,当​挂​载 NFS 目​录​时​必​须​使​用 -o nolock 选​项​。