RE: up2date trick

"Dennis Pinckard" <[email protected]>
Newsgroups gmane.network.up2date.current.devel
Message-ID <[email protected]>
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've been following this thread over the past few days and just
wanted to put in my contribution.

I set up a Current server last week for the first time and it works
great.  I also wanted to have my current server as close to
up-to-date with errata as possible.  For me, a daily update would
suffice, so I created a small shell script, "update_redhat_errata",
and placed it in /etc/cron.daily

I only care about the RedHat 7.2 errata and only certain platforms
under that, but will probably expand it soon to include my 6.2, 7.0,
and 7.1 servers I've inherited.

Basically, it rsync's a mirror's errata packages with mine, then
rebuilds the database.

Hunter, is there an faster/easier way to update the database?  I'll
be honest, once it worked, I pretty much stopped reading
documentation.

Here's the script:


#!/bin/bash
# keep RedHat Errata packages up to date

RSYNC_SERVER=sunsite.dk::ftp/pub/os/linux/redhat/updates/7.2/en/os
UPDATE_DIR=/export/install/admin/linux/redhat/updates/7.2/en/os

#
#Originally used ncftpget to get packages, but switched to rsync
#
#ncftpget -R ftp.rpmfind.net . linux/redhat/updates/7.2/en/os/i386
#ncftpget -R ftp.rpmfind.net . linux/redhat/updates/7.2/en/os/i586
#ncftpget -R ftp.rpmfind.net . linux/redhat/updates/7.2/en/os/i686
#ncftpget -R ftp.rpmfind.net . linux/redhat/updates/7.2/en/os/images
#ncftpget -R ftp.rpmfind.net . linux/redhat/updates/7.2/en/os/noarch
#ncftpget -R ftp.rpmfind.net . linux/redhat/updates/7.2/en/os/SRPMS

#
# I know this section can be greatly condensed, but it works for now.
#
/usr/bin/rsync -avz ${RSYNC_SERVER}/i386/ ${UPDATE_DIR}/i386
/usr/bin/rsync -avz ${RSYNC_SERVER}/i586/ ${UPDATE_DIR}/i586
/usr/bin/rsync -avz ${RSYNC_SERVER}/i686/ ${UPDATE_DIR}/i686
/usr/bin/rsync -avz ${RSYNC_SERVER}/images/ ${UPDATE_DIR}/images
/usr/bin/rsync -avz ${RSYNC_SERVER}/noarch/ ${UPDATE_DIR}/noarch
/usr/bin/rsync -avz ${RSYNC_SERVER}/SRPMS/ ${UPDATE_DIR}/SRPMS

# Update Current server's database
# Is there an better way?
#
/etc/init.d/current stop
/usr/sbin/cadmin -v create redhat-linux-i386-7.2
/etc/init.d/current start




- -----Original Message-----
From: Hunter Matthews [mailto:[email protected]]
Sent: Monday, March 25, 2002 5:28 PM
To: Current Server Mailing List
Subject: Re: [Current-server] up2date trick


> Are you suggesting that I write in the functionality directly into
> Current to download rpms from RHN or I write the functionality to
> do this from the Current server. My goal is to get all the errata
> from RHN in a fast and reliable way to add to the Current server
> database, not to just have the ability to download all the rpms to
> a client from the Current
> server.

Oh shucks. I forgot about that part.

Nevermind. Pay no attention to the caffiene addict.

- -- 
Hunter Matthews                          Unix / Network Administrator
Office: BioScience 145/244               Duke Univ. Biology
Department
Key: F0F88438 / FFB5 34C0 B350 99A4 BB02  9779 A5DB 8B09 F0F8 8438
Never take candy from strangers. Especially on the internet.

_______________________________________________
Current-server mailing list
[email protected]
http://lists.dulug.duke.edu/mailman/listinfo/current-server

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4

iQA/AwUBPKB9jnBWGat9hZ87EQJi3gCgx01dKZjgTwJZP8gcsbK6BN70rVwAn0cR
+8SNnBfQ5MD20lm7Q1NQrsjZ
=SdS9
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.