[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to detect the active debconf frontend?

On 5/16/06, Frank Küster <frank@debian.org> wrote:

how can I find out in postinst which debconf frontend is active?

In case some particular command fails in postinst, we cannot proceed,
and let it "exit 1".  However, to inform the user, we display a debconf
error, telling him how to fix their system.

But if the frontend is noninteractive, the error message will only be
sent by e-mail; and if this happens in a chroot where no mail is
configured, there's no chance at all to see that.

So what we'd like to do is to check whether the frontend is
noninteractive, and additionally output to stderr in that case.
Therefore, I'm looking for a way to ask debconf about the frontend - is
this possible?

The alternative would be to check for $DEBIAN_FRONTEND, and if unset
parse "debconf-show debconf", but this doesn't look clean.

Shouldn't a clean solution be done in debconf code and not in your package code?

Reply to: