#! /bin/ksh # # installation script for globus_resource_management_bundle-server # if [[ $1 = "" ]] then kit_location="`/usr/bin/dirname $0`/.." else kit_location=$1 fi # Because the update procedure potentially (very high likelyhood) # needs to replace shared libraries or other package dependent rpm's # (temporarily breaking packages), we can only perform those upgrades # by making use of the --nodeps flag, otherwhise RPM will refuse to # install them. The --nodeps flag should only be necessary while we're # called via the upgrade-packages.ksh script. It is quite possible # that this particular package does not require the --nodeps flag # during the upgrade procedure, but rather than chance an oversight # (it is difficult to test all permutations as the upgrade procedure # is performed on a random list), the --nodeps flag is employed for # virtually all packages during the upgrade step. if [[ $3 = "Upgrade" ]] then depsflag="--nodeps" fi # # First let's make sure we have superuser privilege # if [ `whoami` != "root" ] then echo "You must be superuser to run this script" exit 1 fi # # We need to ensure that it's a V5.1 or V5.1A system... # OS_VERSION=`/usr/sbin/sizer -v | cut -d" " -f 4 | cut -b 2-5` if [[ $OS_VERSION < "5.1" ]] then echo "You need Tru64 UNIX V5.1 to install any of the" echo "rpm kits from this CD-ROM!" echo "Please refer to the /mnt/README file for instructions" echo exit 1 fi # let's make sure that there's a /tmp directory if [[ ! -d /tmp ]] then echo "directory /tmp was not found." echo "This script requires a writable /tmp directory" echo "Exiting globus_resource_management_bundle-server installation script..." echo exit 1 fi if [[ ! -w /usr/tmp ]] then echo "directory /tmp is not writable." echo "This script requires a writable /tmp directory" echo "Exiting globus_resource_management_bundle-server installation script..." echo exit 1 fi # let's make sure that there's a /usr/local directory if [[ ! -d /usr/local ]] then echo "directory /usr/local was not found." echo "rather than create a /usr/local directory for you," echo "you are advised to mount a separate (from /usr) 800Mb+ file system" echo "at /usr/local ." echo "Exiting globus_resource_management_bundle-server installation script..." echo exit 1 fi if [[ ! -w /usr/local ]] then echo "directory /usr/local is not writable." echo "Exiting globus_resource_management_bundle-server installation script..." echo exit 1 fi # Need to ensure that /usr/local is not an nfs mounted file system: /sbin/mount -t nfs | awk '$3=="/usr/local"{exit 1}' if [ $? != 0 ]; then echo "This script cannot install this kit to an NFS mounted file system." echo "Exiting globus_resource_management_bundle-server installation script..." echo exit 1 fi # This (as well as all "globus bundles") requires that gpt-1.0, an NON-RPM # package be pre-installed. echo "Checking if prerequisite gpt-1.0 is already installed..." if [[ ! -f /usr/local/globus/sbin/globus-install ]] then echo echo "Could not find the prerequisite gpt-1.0 files on this" echo "system." echo echo "Because gpt-1.0 is not in rpm format, you will need to" echo "manually invoke the /mnt/SETUP/install-gpt-1.0.ksh" echo "script before reinvoking this script." echo echo "Exiting globus_resource_management_bundle-server installation script..." echo exit fi # # Now let's check for required free space. # # Each of the "globus bundles" includes files that are also contained in # other "globus bundles". The /usr/local/globus/sbin/globus-install # script reconciles the overlap, but calculating the space requirement # for individual bundles can differ depending on the order in which a # bundle gets installed. The "required space" figure used in this script # was determined by performing the installation of this bundle as the # "first" (thus the actual required space may be less if other bundles # are already installed when this script is called. # globus_resource_management_bundle-server requires 11296768 bytes in /usr/local Required_space=11296768 space_avail="`/sbin/df /tmp | tail -1 | awk '{print $4}'`" let "space_avail=space_avail*512" if (( $space_avail < $Required_space )) then echo echo "The amount of required free space to Install the" echo "globus_resource_management_bundle-server" echo "on this system is: $Required_space bytes" echo echo "Sorry, you don't have enough space to install the" echo "globus_resource_management_bundle-server" echo echo "Exiting globus_resource_management_bundle-server installation script..." echo exit 1 else if [[ $2 != quiet ]] then echo echo "The amount of required free space to install" echo "globus_resource_management_bundle-server" echo "on this system is: $Required_space bytes, leaving you with" let "Remaining_space=$space_avail-$Required_space" echo "$Remaining_space bytes free in your /usr/local file system" echo echo "Do you want to continue? [y/n]: \c" read answer echo if [ "$answer" = "n" ] || [ "$answer" = "N" ] then exit fi if [ "$answer" != "y" -a "$answer" != "Y" ] then echo "Response $answer is not recognized, " echo "Exiting globus_resource_management_bundle-server installation script..." echo exit 1 fi fi fi # # Installing globus_resource_management_bundle-server kit... # GLOBUS_LOCATION=/usr/local/globus; export GLOBUS_LOCATION GPT_LOCATION=/usr/local/globus; export GPT_LOCATION /usr/local/globus/sbin/globus-install \ $kit_location/GLOBUS/globus_resource_management_bundle-server-osf1-alpha-vendorcc64.tar.gz # !!!!!!!!!!!!!!!!!!!!!!! NEED TO CHANGE THIS !!!!!!!!!!!!!!!!!!!!! if [[ -f /usr/local/globus/sbin/globus-install ]] then echo echo "globus_resource_management_bundle-server is now installed on this system." echo echo " -----------------------------------------------------------" echo else echo echo "An unknown ERROR was encountered. This script FAILED to" echo "install globus_resource_management_bundle-server on your system !!" echo echo exit fi exit