#!/bin/sh
. /usr/share/debconf/confmodule
template="$1"
min="$2"
db_title "Low memory"
db_subst "$template" MIN "$min"
db_input critical "$template" || true
db_go || true

for var in countrychooser/country countrychooser/country-name \
	countrychooser/shortlist; do
	if ! db_get $var; then
		db_register debian-installer/dummy $var || true
	fi
done

db_set debian-installer/framebuffer false || true

db_set languagechooser/language-name "English" || true
db_fset languagechooser/language-name seen true || true

db_set debian-installer/locale "en_US" || true

# XXX: do we really need to set this? shortlist is probably the only thing
# needed.
db_set countrychooser/country "US" || true
db_fset countrychooser/country-name seen true || true

db_set countrychooser/shortlist "US" || true
db_fset countrychooser/shortlist seen true || true

# GNOME's not going to run anyway.
db_fget ubuntu/install-type seen
if [ "$RET" = false ]; then
	if ! db_set ubuntu/install-type custom; then
		db_register debian-installer/dummy ubuntu/install-type
		db_set ubuntu/install-type custom
		db_subst ubuntu/install-type ID ubuntu/install-type
	fi
	db_fset ubuntu/install-type seen true
fi
