#!/bin/ksh
if test -x /usr/ucb/whoami
then
/usr/ucb/whoami | read USERID
else
USERID=root
fi
if [ "$USERID" != root ]
then
echo "You have to be root to install any component!"
echo "Installation aborted"
exit 1
fi
pkginfo IMinerCnv > /dev/null 2>/dev/null
if test $? -eq 0
then
echo "Patching IMinerCnv"
pkgadd -a ./admin -d ./IP22297.pkg IMinerCnv
pkginfo IMinerSc > /dev/null 2>/dev/null
if test $? -eq 0
then
echo "Patching IMinerSc"
pkgadd -a ./admin -d ./IP22296.pkg IMinerSc
fi
else
echo "No Scoring Services installation found, aborting."
exit 1
fi
echo "Installation completed successful."
exit 0
