R P Herrold wrote:
>
> After mirroring, in the second script, It looks as though all
> that needs be done is to change one line to read:
OK, mirroring works well, but how do we now update the two
cd's? Previously there was just the one and would use something like
the script below, but now, there is disk1 and disk2.
On my HDD I have my dir struture
-disk1
/home/kevin/redhat/7.0/i386-|
-disk2
# /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 architechture is $ARCH.
RHVERSION=7.0
ARCH=i386
HOME=home/kevin/redhat
CDDIR=/${HOME}/${RHVERSION}
RPMDIR=${CDDIR}/${ARCH}/RedHat/RPMS
UPDDIR=/${HOME}/${RHVERSION}/updates/
OLDDIR=${CDDIR}/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
else
if [ `basename $rpm` != `basename $OLDNAME` ]; then
mv $OLDNAME $OLDDIR
cp -pv $rpm $RPMDIR
fi
fi
done
# Copy new boot image files to the right place...
for newfile in ${UPDDIR}/images/* ; do
file=${CDDIR}$/${ARCH}/images/$(basename ${newfile})
if [ $newfile -nt $file ] ; then
cp -pv $newfile $file
fi
done
--
Kind regards
Kevin Waterson
_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list