#! /bin/sh
#
#
if [ "$saveold" = "no" ]; then
	echo ""
	echo ""
	echo "This patch MUST be installed with the backout option enabled."
	echo "Please do not invoke patchadd(1M) with the -d option for this patch. "
	echo "If backout space is an issue, save the backout data to another "
	echo "location using the -B option. See patchadd(1M) for the details."
	echo ""
	exit 1
fi

echo ""
echo ""
echo "	   This is a preliminary supplemental patch which is"
echo "	   designed to address the concerns identified in the"
echo "	   patch README file."
echo ""
echo "	   Sun may release this as a full patch at a later date,"
echo "	   however, Sun is under no obligation whatsoever to"
echo "	   create, release or distribute any such patch."
echo ""
echo "	   Installing this patch is at the users discretion."
echo ""
echo ""

#
# Asks user if he would like to continue.  It will timeout in
# SLEEP_TIME and installation will continue if no response is given.
#

SLEEP_TIME=120
times_up()
{
	exit 0
}

trap 'times_up' ALRM
( sleep $SLEEP_TIME ; kill -ALRM $$ ) &
child_pid=$!

echo "Do you wish to continue this installation {yes or no} [yes]? \\c"
echo "\n(by default, installation will continue in $SLEEP_TIME seconds)"

read Response
while [ 1 ]
do
	case $Response in
		n | no | N | NO | No)
			kill -9 $child_pid
			exit 1 ;;
		"" | y | yes | Y | Yes | YES)
			kill -9 $child_pid
			exit 0 ;;
		*)  echo "yes or no please. \\c"
			read Response ;;
	esac
done
exit 0
