#!/bin/sh
#
# Script to install Solaris Security Cluster Patch and Solaris Patch Set for JRE 1.3
# This is for Solaris 5.6/2.6 only
#
who=`id | grep root`
if [ "$who" = "" ]
then
	echo "**** You have to be * root * to run this command ****"
	exit
fi
#
echo "**** Script to install patches for Solaris 5.6/2.6 ****"
echo "Untar patch files ..."
tar -xvf ./patch56.tar
echo
echo "Start installing Solaris Recommended & Security Patch Clusters ..."
name=2.6_Recommended
echo "Untar patch clusters ..."
/usr/local/bin/gzip -d ./$name.tar.Z
tar -xf ./$name.tar
cd $name
echo "Start cluster installation ..."
./install_cluster -q
echo "Cleaning up working space ..."
cd ..
rm -rf ./$name ./$name.tar
echo "Solaris Recommended & Security Patch Clusters installation done !"
#
echo "Start installing Solaris Patches for 1.3 JRE ..."
for i in `cat ./list56`
do
	echo "Start installing patch $i ..."
	/usr/local/bin/gzip -d ./${i}_tar.Z
	tar -xf ./${i}_tar
	cd $i
	./installpatch .
	echo "Cleaning up working space ..."
	cd ..
	rm -rf ./$i ./${i}_tar
	echo "Patch $i installation done !"
done
rm -rf list56
echo "Solaris Patches for 1.3 JRE installation done !"
