RE: [CentOS] how to 'yum update' in a %post

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I do our installs via PXE / HTTP, I go and get a post install script and run
it.  This way I don't have to muck around with the php scripts that generate
the kickstart files for the installs.



%post
mkdir -p /root/bin; cd /root/bin
wget -q
http://centos-4-repo1.XXX.XXX/yam/centos4-i386/install/post-install.sh
sh /root/bin/post-install.sh 2>&1 | tee >> /root/post-install.log 


Script on the kickstart server - post-install.sh


rm -rf /etc/yum/repos.d/*

cat >> /etc/yum.conf << "EOF"
[base]
name=CentOS-$releasever - Base
baseurl=http://centos-4-repo1.XXX.XXX/yam/centos4-i386/RPMS.os
        http://centos-4-repo2.XXX.XXX/yam/centos4-i386/RPMS.os
gpgcheck=0

[update]
name=CentOS-$releasever - Updates
baseurl=http://centos-4-repo1.XXX.XXX/yam/centos4-i386/RPMS.updates
        http://centos-4-repo2.XXX.XXX/yam/centos4-i386/RPMS.updates
gpgcheck=0
EOF

yum -y update



J.J.

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.1/355 - Release Date: 6/2/2006
 

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux