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

Re: debconf-question-asking cgi script

Luke Kenneth Casson Leighton wrote:
> therefore, would you mind advising me: what command-line tools are there
> (no - i will not write in perl) to dump a debconf template for a
> particular item?
> i don't mind using debconf-get-selections but i really need the list
> of options/answers for e.g. a drop-down list and i need the descriptive
> text etc. etc.

debconf contains bindings to multiple languages (perl, python, shell) that
expose access to the database via the debconf protocol. The debconf protocol
can be used to get at all of that stuff if you really want to. Example in
shell (as I don't write python):

. /usr/share/debconf/confmodule
db_get $Q
echo "Value: $RET"
db_fget $Q seen
echo "Seen: $RET"
db_metaget $Q choices
echo "Choices: $RET"
db_metaget $Q description
echo "Description: $RET"
db_metaget $Q extended_description
echo "Extended Description: $RET"

Value: high
Seen: true
Choices: critical, high, medium, low
Description: Ignore questions with a priority less than:
Extended Description: Debconf prioritizes the questions it asks you. Pick the lowest priority of question you want to see:

see shy jo

Attachment: signature.asc
Description: Digital signature

Reply to: