#!/bin/sh -e
#
# debian/config for getpath
# Ask whether or not to overwrite the conf file.
# Perhaps make the login files call getpath.
#

umask 022
pkg=getpath
. /usr/share/debconf/confmodule

askconf()
{
	#
	# Overwrite /etc/getpath.conf ?
	#

	# dpkg handles this for us
	return 0

	if [ -e /etc/getpath.conf ]; then
		db_input high getpath/writeconf || true
		db_go
	fi

}

askrc()
{
	#
	# Check login files?
	#

	db_input medium getpath/editrc || true
	db_go
	db_get getpath/editrc
	if [ "$RET" = "true" ]; then
		db_input medium getpath/editrc_yes || true
	else
		db_input medium getpath/editrc_no  || true
	fi
	db_go

}

case "$1" in
	(configure)
		askconf
		askrc
		;;
	(reconfigure)
		askconf
		;;
esac
exit 0
