Subject: Re: Bug#320201: debconf: should fallback to teletype frontend if TERM does not have correct value

From: Joey Hess <[email-masked]>
Date: Mon, 1 Aug 2005 17:00:26 -0400

Eugeniy Meshcheryakov wrote:
> 29 липня 2005 о 19:40 -0400 Joey Hess написав(-ла):
> > 
> > Any idea of a good way to check for this? Note that it would need to
> > work using only the packages in base.
> > 
> 
> This should work (tput is from ncurses-bin):
> 
> if tput init > /dev/null 2>&1; then
>  echo "Run dialog frontend"
> else
>  echo "Run teletype frontend"
> fi
> 
> Examples:
> 
> $ TERM=linux tput init > /dev/null 2>&1; echo $?
> 0
> $ TERM=cvgfdvfdbrt tput init > /dev/null 2>&1; echo $?
> 3

Thanks, that looks fine, even the priorities allow it. I do need to
decide if it's worth adding a dependency on ncurses-bin just to test for
this edge case.

-- 
see shy jo