Je Sun, 27 May 2001 23:59:48 -0400,
"Christian T. Steigies" <[EMAIL PROTECTED]> scribis:
> Also I am confused by this section in the tutorial:
>
> The Config Script
> [...]
> Do not make your postinst use debconf to ask questions.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> But then it says:
> [...]
> #!/bin/sh -e
>
> # Source debconf library.
> . /usr/share/debconf/confmodule
> db_get foo/like_debian
> ^^^^^^^^^^^^^^^^^^^^^^
> So it is asking a question in the postinst? I don't want to ask a question
> in the postinst (I ask it in the preinst), in postinst I just want to
> display a message when an old score file is present and is removed. How do I
> do that?
No, db_get only queries the database, it doesn't generate any output
(that's what db_input is for).
If you need issue the sysadmin a warning, which I think is your case,
do it in the config script with a db_input.
As to displaying a message in the postinst, and this is something I've
been wondering about for a while, it looks like you should either do a
db_stop first or send any messages to stderr. Using db_input in the
postinst is, IMO, *not* the right thing to do (since it requires the
intervention of the sysadmin). But, can anyone confirm this?
-itai
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]