theme="$(debconf-get debian-installer/theme)"

if [ "$theme" ]; then
	case "$DEBIAN_FRONTEND" in
	    newt|text)
		export FRONTEND_BACKGROUND="$theme"
		;;
	    gtk)
		gtk-set-theme "$theme" || true
		;;
	esac
	case "$theme" in
	    dark)
		debconf-set-selections /usr/share/rootskel/mate-preseed.cfg
		;;
	esac
fi
