#!/bin/sh UP2DATEFILE=/etc/sysconfig/rhn/up2date #UP2DATEFILE=/tmp/up2date stamp=`date +"%s"` arch=`/bin/uname -i` # Commented out--don't think we need anymore -- dphillip 2004-11-19 # if [ "$arch" = "i386" ]; then # echo "" # echo "Fixing up2date automatic update failure problem..." # echo rpm -e --nodeps up2date up2date-gnome # echo rpm -ivh http://rhn.nacs.uci.edu/pub/up2date-4.3.14-1.i386.rpm # echo rpm -ivh http://rhn.nacs.uci.edu/pub/up2date-gnome-4.3.14-1.i386.rpm # else # echo "" # echo "No up2date fix available for this architecture" # fi echo "" echo "Retrieving CERT rpm..." ###rpm -i http://rhn.nacs.uci.edu/pub/rhns-ca-cert-1.0-3.noarch.rpm rpm -i http://rhn.nacs.uci.edu/pub/cur-cert.rpm echo "" echo "Installing GPG keys..." /bin/rpm --verbose --import /usr/share/rhn/*-GPG-* # Added this because rpm import doesn't always seem to work.. #/usr/bin/gpg --import /usr/share/rhn/RPM-GPG-KEY /usr/bin/gpg --list-keys echo "" echo "Updating $UP2DATEFILE..." echo "" echo " Making backup copy in $UP2DATEFILE.$stamp.orig..." cp $UP2DATEFILE $UP2DATEFILE.$stamp.orig echo "RH hasn't fixed update problem--skipping config" echo "Updates will come from Red Hat's servers" echo "" echo "Restarting rhnsd daemon..." /sbin/service rhnsd restart echo "Registering system" if [ -f /etc/sysconfig/rhn/systemid ]; then echo -n "This host seems to already be registered--re-register? [n] " read ans if [ "$ans" = "y" ]; then echo " Removing old key" /bin/rm /etc/sysconfig/rhn/systemid echo -n " Cut-n-paste registration key here: " read key echo " Registering with RHN" /usr/sbin/rhnreg_ks --activationkey=$key #--force else echo " Not re-registering system." fi else echo -n " Cut-n-paste registration key here: " read key echo " Registering with RHN" /usr/sbin/rhnreg_ks --activationkey=$key #--force fi echo "" echo "Removing conflicting packages from RHN bug..." /bin/rpm -e HelixPlayer-1.0.1.gold-8EL /bin/rpm -e pdksh-5.2.14-30 echo "" echo "Running up2date to complete install." echo "Please reboot after update completes." /usr/sbin/up2date --nox --update --force echo "" echo "Up2date configure complete. If no errors occurred, you may reboot the system now." echo ""