#!/bin/sh
case "$1" in
  configure)

#	CONFIGFILE=$(tempfile -m 644)
	CONFIGFILE=$(mktemp)
	chmod 644 $CONFIGFILE
	set -e
	. /usr/share/debconf/confmodule
	
	if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then
	    
	    db_get gcl@EXT@/default_gcl_ansi
	    
	    if [ "$RET" = "true" ] ; then 
		DEFAULT_GCL_ANSI=t
	    else
		DEFAULT_GCL_ANSI=
	    fi
	    
	    db_get gcl@EXT@/default_gcl_prof
	    
	    if [ "$RET" = "true" ] ; then 
		DEFAULT_GCL_PROF=y
	    else
		DEFAULT_GCL_PROF=
	    fi
	    
	    echo "DEFAULT_GCL_ANSI=$DEFAULT_GCL_ANSI" >> $CONFIGFILE
	    echo "DEFAULT_GCL_PROF=$DEFAULT_GCL_PROF" >> $CONFIGFILE
	    
	fi
	
	ucf --debconf-ok $CONFIGFILE /etc/default/gcl@EXT@
	ucfr gcl@EXT@ /etc/default/gcl@EXT@

#	chmod 644 /etc/default/gcl@EXT@
	
esac

#DEBHELPER#

