#!/bin/sh # # install.sh # # Uninstall packages necessary for AG2. This script uninstalls all # the packages for AG 2.1.2 # # Note: It currently makes no effort to handle failures! # # # # # Define RPMS # To update this script to install newer versions of packages # change the variables defined here # export WXWINDOWS="wxGTK" export WXWINDOWS_VER="2.4.0-1" export LOGGING="logging" export LOGGING_VER="0.4.7-2" export PYOPENSSL="pyOpenSSL_AG" export PYOPENSSL_VER="0.5.1-3" export GPT="gpt" export GPT_VER="1.0-2" export GLOBUS="globus-accessgrid" export GLOBUS_VER="2.0-2" export PYGLOBUS="pyGlobus" export PYGLOBUS_VER="cvs-10" export AGRAT="AccessGrid-rat" export AGRAT_VER="4.2.22-3" export AGVIC="AccessGrid-vic" export AGVIC_VER="2.8ucl1.1.3-3" export AG=" AccessGrid-BridgeServer AccessGrid-VenueClient AccessGrid-VenueServer AccessGrid" export AG_VER="2.1.2-12" ################################################################# # UnInstall processing begins here ################################################################# # # UnInstall the specified package and version # # - existing packages are not installed # - downrev packages are freshened # - non-existent packages are installed UnInstall() { export package="$1" export package_ver="$2" export rpm_opts="$3" export package_rpm="$package-$package_ver.i386.rpm" rpm -q --quiet $package if [ $? -eq 0 ] ; then rpm -e $package-$package_ver else echo "Package not installed:" $package-$package_ver fi } # # Inform user what will be done and prompt to continue # echo "This script completely uninstalls the necessary RPMS for the " echo "Access Grid software, with the exception of python. " echo "" echo "Continue?" read response if [ "$response" != 'y' ] && [ "$response" != "Y" ] then exit fi # # Before installing, check whether globus is already installed # if [ "`rpm -q -v $GLOBUS`" == "$GLOBUS-$GLOBUS_VER" ] ; then export GLOBUS_PREINSTALLED=1 fi # # UnInstall AG RPMS # echo "***********************************************" echo "UnInstall Access Grid packages " echo "***********************************************" for package in $AG ; do UnInstall $package $AG_VER done # # UnInstall AG media tools RPMS # echo "***********************************************" echo "UnInstall media tools " echo "***********************************************" UnInstall $AGRAT $AGRAT_VER UnInstall $AGVIC $AGVIC_VER # # UnInstall Phase 2 RPMS # echo "***********************************************" echo "UnInstall prerequisites (phase 2) " echo "***********************************************" UnInstall $PYGLOBUS $PYGLOBUS_VER # # UnInstall Phase 1 RPMS # echo "***********************************************" echo "UnInstall prerequisites (phase 1) " echo "***********************************************" UnInstall $WXWINDOWS $WXWINDOWS_VER UnInstall $LOGGING $LOGGING_VER UnInstall $PYOPENSSL $PYOPENSSL_VER UnInstall $GLOBUS $GLOBUS_VER UnInstall $GPT $GPT_VER echo "" echo "UnInstall finished." echo ""