#! /bin/sh 
#
# This script is to force users to install patch 107171 rev 07 or newer if 
# either of rev 05 or rev 06 existed. 

patchrm_patch_rev=`/usr/sbin/patchadd -p | sed -e 's/^Patch: //' -e 's/ .*$//' -e '/107171/!d' -e 's/^107171-//' | sort | tail -1` 

if [ "${patchrm_patch_rev}" -lt 7 -a "${patchrm_patch_rev}" -gt 4 ]
then
   echo "Patchrm has detected patch 107171-${patchrm_patch_rev} as being \
installed. Please install"
   echo "107171-07 or newer before backing out ${PatchNum}."
   exit 1
fi

exit 0

