# request script to control a patch installation.
# package format options.
#
#       @(#)request 1.1 95/07/31 SMI
#
# Copyright (c) 1995 by Sun Microsystems, Inc.
# All rights reserved
#

PATH=/usr/sadm/bin:$PATH

BACKOUT_MSG="Do you not want to be able to backout this patch?"
UNCOND_MSG="Do you want to install this patch even if it requires installation of other patches or it is already installed?"

active_base=`echo $SUNW_PATCHID | nawk '
	{ print substr($0, 1, match($0, "-")-1) } '`

# Is this a restricted patch?
if echo $active_base | egrep -s "R"; then
	# If so, backout is required.
	echo "PATCH_NO_UNDO=" > $1
else
	# else, see if backout is desired
	response=`ckyorn -p "$BACKOUT_MSG"`
	if [ $response = "y" ]; then
		# Tell the world
		echo "PATCH_NO_UNDO=true" > $1
	fi
fi

response=`ckyorn -p "$UNCOND_MSG"`
if [ $response = "y" ]; then
	# Tell the world
	echo "PKG_UNCONDITIONAL=true" > $1
fi

# If this additional operations are required for this package, place
# those package-specific commands here.

#XXXSpecial_CommandsXXX#

exit 0
