usrinput_ask_default_installation ()
{
	licutil_print_licinfo

	while :
	do
		echo_message "$MSG_INSTALL_CHOICE"

		read X

		case $X in
		  f* | F* | "") return 1
				;;
		  c* | C*)	return 0
				;;
		  q* | Q*)	installation_cleanup
				exit 1
				;;
		  *)		echo_message "$MSG_INVALID_RESPONSE"
				;;
		esac
	done
}

PROD_EXCLUDE_LIST="xxxx"

ask_install_package ()
{
	#
	#	e.g. ask_install_package "rdbms" "$MSG_PKG_RDBMS"
	#
	X=`licutil_licenced_product $1`

	test "$X" = "no" && return

	while :
	do
		X=`echo_message "$2" "$3"`
		echo_message "$MSG_QUERY_INSTALL_PKG" "$X"

		ynq y

		RV=$?
		test "$RV" = "$yes" && return
		test "$RV" = "$quit" && installation_cleanup && exit 1
		test "$RV" = "$no" || continue

		PROD_EXCLUDE_LIST="$PROD_EXCLUDE_LIST $1"
		return
	done
}

package_to_install ()
{
	PROD_EXCLUDE_LIST="$PROD_EXCLUDE_LIST xxxx"

	X=`licutil_licenced_product $1`
	test "$X" = no && return 1

	case $PROD_EXCLUDE_LIST in
	  *" $1 "*)	return 1 ;;
	esac

	return 0
}

usrinput_ask_customize_options ()
{
	#
	# export PROD_EXCLUDE_LIST
	#

	echo

	ask_install_package "rdbms" "$MSG_PKG_RDBMS"
	ask_install_package "rdbms_rt" "$MSG_PKG_RDBMS_RT"
	ask_install_package "docs" "$MSG_PKG_DOCS"
	ask_install_package "docsvr" "$MSG_PKG_DOCSVR"
	ask_install_package "odbccl" "$MSG_PKG_ODBCCL"
	ask_install_package "jdbc" "$MSG_PKG_JDBC"
	ask_install_package "rtdccl_dev" "$MSG_PKG_RTDCCL_DEV"
	ask_install_package "ehtml" "$MSG_PKG_EHTML"
	ask_install_package "empperl" "$MSG_PKG_EMPPERL"
	ask_install_package "emptcltk" "$MSG_PKG_EMPTCLTK"
	if test -f $PKG_NETSCAPE_INFO
	then
		. $PKG_NETSCAPE_INFO
		ask_install_package "netscape" "$MSG_PKG_NETSCAPE" "$NETSCAPE_VERSION"
	fi
}

usrinput_ask_extra_question ()
{
	test "$LOGIN_SHELL" = "unknown" && return
	test "$LOGIN_SHELL" = "" && return

	echo_message "$MSG_INFO_SHELL_RC" $LOGIN_SHELL $SHELL_STARTUP_FILE

	shrc_construct_startup_file

	echo

	while :
	do
		echo_message "$MSG_QUERY_CHG_SH_RC" $SHELL_STARTUP_FILE
		ynq y

		case $? in 
		  $yes)	INST_ALTER_STARTUP_FILE=yes
			break ;;
		  $no)	INST_ALTER_STARTUP_FILE=no
			break ;;
		  $quit)installation_cleanup
			exit 1
			;;
		esac
	done
}

usrinput_last_confirmation ()
{
	clear_screen

	echo_message "$MSG_INSTALL_BANNER2"

	X=`licutil_licenced_evaluation_deadline`
	test "$X" = "" || echo_message "$MSG_EVAL_DATE" "$X"

	X=`licutil_licenced_product beta`
	test "$X" = "yes" && echo_message "$MSG_INFO_BETA"

	X=`licutil_licenced_product rdbms`
	
	if test "$X" = "yes"
	then
		X=`licutil_licenced_proc_limit`

		if test "$X" = "1"
		then
			echo_message "$MSG_SINGLE_USER_LIC"
		else
			echo_message "$MSG_INFO_LIC_LIMIT" "$X"
		fi
	fi

	echo_message "$MSG_INFO_INST_PKG_LIST" $INSTALL_DIR

	package_to_install rdbms && echo_message "$MSG_INFO_RDBMS"
	package_to_install rdbms_rt && echo_message "$MSG_INFO_RDBMS_RT"

	if package_to_install docs && package_to_install docsvr
	then
		echo_message "$MSG_INFO_DOCS_AND_SVR"
	elif package_to_install docs
	then
		echo_message "$MSG_INFO_DOCS"
	elif package_to_install docsvr
	then
		echo_message "$MSG_INFO_DOCSVR"
	fi

	package_to_install odbccl && echo_message "$MSG_INFO_ODBCCL"
	package_to_install jdbc && echo_message "$MSG_INFO_JDBC"
	package_to_install rtdccl_dev && echo_message "$MSG_INFO_RTDCCL_DEV"
	package_to_install ehtml && echo_message "$MSG_INFO_EHTML"
	package_to_install empperl && echo_message "$MSG_INFO_EMPPERL"
	package_to_install emptcltk && echo_message "$MSG_INFO_EMPTCLTK"

	if package_to_install netscape 
	then
		if test -f $PKG_NETSCAPE_INFO
		then
			. $PKG_NETSCAPE_INFO
			echo_message "$MSG_INFO_NETSCAPE" "$NETSCAPE_VERSION"
		fi
	fi

	OLD_EXTENSION=`date "+%Y-%m-%d-%T"`

	test -d $INSTALL_DIR && case "$INSTALL_DIR_OPT" in
	 	overwrite)
			echo_message "$MSG_WARN_INSTDIR_NOT_EMPTY" ;;
		move)	
			echo_message "$MSG_WARN_MOVE_INSTDIR" "$INSTALL_DIR" \
				"$INSTALL_DIR.$OLD_EXTENSION"
			;;
	esac

	test "$INST_ALTER_STARTUP_FILE" = "yes" && \
	echo_message "$MSG_INFO_ALTER_SHRC" "$SHELL_STARTUP_FILE"

	while :
	do
		echo_message "$MSG_QUERY_INSTALL"

		ynq y

		case "$?" in
		   $yes)	return 0 ;;
		   $no)		return 1 ;;
		   $quit)
				installation_cleanup
				exit 1 ;;
		esac
	done
}
