[CentOS] installing updates in post kickstart

Fri Apr 10 20:16:02 UTC 2009
nate <centos at linuxpowered.net>

Jerry Geis wrote:
> I can do a yum update in my post kickstart (which is what I am doing now
> actually).
>
> However, I want to save network time at installations.
> If I copy down the files from centos/5.3/updates/x86_64/RPMS
> and place them in a directory local on my network,
> can I just "rpm -U /mnt/directory/updates/x86_64/RPMS*"
> in my post section?
>
> Assuming I have nfs mounted the directory of course...

I do this, but not over NFS, over HTTP.

I create a repository that has all of the packages I
want to update from and have something like this in my
%post

(This is for CentOS 5.2, I may go to 5.3 later in the year)
cat <<EOF;
###############################################################################
## Update the Linux Kernel                                                   ##
###############################################################################
EOF
rpm -Uvh
http://10.1.10.31/updates/centos_5/static/i386/kernel-2.6.18-92.1.22.el5.i686.rpm
http://10.1.10.31/updates/cento
s_5/static/i386/kernel-devel-2.6.18-92.1.22.el5.i686.rpm
http://10.1.10.31/updates/centos_5/static/i386/kernel-headers-2.6
.18-92.1.22.el5.i386.rpm

cat <<EOF;
###############################################################################
## Update System RPMS                                                        ##
###############################################################################
EOF
wget -P /tmp -np -q -r
http://10.1.10.31/updates/centos_5/kickstart-postinstall/i386/
rpm -Uvh /tmp/10.1.10.31/updates/centos_5/kickstart-postinstall/i386/*rpm
rm -rfv /tmp/10.1.10.31


--

I've been using this method for a couple years now and works
good for me.

nate