1CONFMODULE(3)              Library Functions Manual              CONFMODULE(3)
2
3
4

NAME

6       confmodule - communicate with Debian configuration system FrontEnd.
7

SYNOPSIS

9         #!/bin/sh -e
10         . /usr/share/debconf/confmodule
11         db_version 2.0
12         db_capb 'backup'
13         CAPB=$RET
14         db_input 'foo/bar' || true
15         db_go || true
16

DESCRIPTION

18       This  is  a  library  of  shell functions that eases communication with
19       Debian's configuration management system. It  can  communicate  with  a
20       FrontEnd  via  the debconf protocol. The design is that each command in
21       the protocol is represented by one function in this module.  The  func‐
22       tionname  is  the same as the command, except it is prefixed with "db_"
23       and is lower-case. Call the function and pass  in  any  parameters  you
24       want  to  follow the command. Any textual return code from the FrontEnd
25       will be returned to you in the $RET variable, while the numeric  return
26       code  from the FrontEnd will be returned as a return code (and so those
27       return codes must be captured or ignored).
28

NOTES

30       Once this library is loaded, any text you later output will go to stan‐
31       dard  error,  rather than standard output. This is a good thing in gen‐
32       eral, because text sent to standard output is interpreted by the  Fron‐
33       tEnd  as  commands.  If  you  do want to send a command directly to the
34       FrontEnd, you must output it to file descriptor 3, like this:
35         echo GET foo/bar >&3
36
37       The library checks to make sure it is actually speaking to  a  FrontEnd
38       by examining the DEBIAN_HAS_FRONTEND variable. If it is set, a FrontEnd
39       is assumed to be running. If not, the library turns into one, and  runs
40       a  copy  of  the  script  that loaded the library connected to it. This
41       means that if you source this library, you should do so  very  near  to
42       the  top  of your script, because everything before the sourcing of the
43       library may well be run again.
44

SEE ALSO

46       debconf-devel(7),   dpkg-preconfigure(8),   dpkg-reconfigure(8),   deb‐
47       conf_specification in the debian-policy package
48

AUTHOR

50       Joey Hess <joeyh@debian.org>
51
52
53
54                                                                 CONFMODULE(3)
Impressum