
- •Table of Contents
- •Burning a RedHat CD HOWTO
- •Morten Kjeldgaard, mok@imsb.au.dk and Peter von der Ahé, pahe+rhcd@daimi.au.dk
- •1.Introduction
- •2.Anatomy of the Red Hat FTP site
- •3.RPM packages
- •4.Obtaining your local copy of the distribution
- •5.Incorporating the updates
- •6.At last: burning the CD
- •7.Installing from the CD
- •8.Other Linux distributions
- •9.This document...
- •10.DISCLAIMER
- •1.Introduction
- •2.Anatomy of the Red Hat FTP site
- •2.1 The top level directory
- •2.3 The "updates" directory
- •3.RPM packages
- •4.Obtaining your local copy of the distribution
- •5.Incorporating the updates
- •5.1 Correcting the file protection modes
- •5.2 Replacing the updated RPMS
- •Important note for RedHat 6.0, 6.1
- •5.3 Generating a new hdlist file
- •Important note for RedHat 6.1
- •Important note for RedHat 5.2
- •5.4 The comps file
- •Format of comps file in RedHat versions < 6.1
- •Format of comps file in RedHat version 6.1
- •6.At last: burning the CD
- •6.1 Creating a bootable CD
- •Create iso9660 disk image
- •Test the image
- •Burn the disk
- •7.Installing from the CD
- •7.1 Booting from a bootable CD
- •8.Other Linux distributions
- •9.This document...
- •9.1 Related documentation
- •9.2 Acknowledgements
- •10.DISCLAIMER

Burning a RedHat CD HOWTO
# Make them executable while read file
do
if [ ! −x $file ] ; then chmod −c 755 $file
fi
done < $LIST
/bin/rm $LIST
exit 0
5.2 Replacing the updated RPMS
The following script called updateCD copies all files from the update directory to the RPMS directory. The script uses some nifty rpm tricks to determine what packages in the updates directory are more recent. Older packages are moved to the ${OLD} directory.
#! /bin/bash
#This script updates rpms in a RedHat distribution found in $RPMDIR.
#The old rpms will be placed in $OLDDIR.
#The new rpms should be located in $UPDDIR.
#The new images are in $IMGDIR
#The images to be updated are in $OMGDIR
#The architechture is $ARCH.
RHVERSION=6.1
ARCH=i386
RHROOT=/jaz/redhat−${RHVERSION}
RPMDIR=${RHROOT}/${ARCH}/RedHat/RPMS
UPDDIR=${RHROOT}/updates/${ARCH}
IMGDIR=${RHROOT}/updates/images/${ARCH}
OMGDIR=${RHROOT}/${ARCH}/images
OLDDIR=${RHROOT}/old
if [ ! −d $OLDDIR ] ; then
echo making directory $OLDDIR mkdir $OLDDIR
fi
allow_null_glob_expansion=1
for rpm in ${UPDDIR}/*.rpm ; do
NAME=`rpm −−queryformat "%{NAME}" −qp $rpm` unset OLDNAME
for oldrpm in ${RPMDIR}/${NAME}*.rpm ; do
if [ `rpm −−queryformat "%{NAME}" −qp $oldrpm` = "$NAME" ]; then OLDNAME=$oldrpm;
break
fi done
if [ −z "$OLDNAME" ]; then echo $NAME is new
cp −pv $rpm $RPMDIR
5.2 Replacing the updated RPMS |
8 |