File: confmodule.txt

package info (click to toggle)
cdebconf 0.74.2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,860 kB
  • ctags: 1,063
  • sloc: ansic: 10,240; sh: 457; makefile: 364; sql: 51; perl: 13
file content (40 lines) | stat: -rw-r--r-- 1,231 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Most clients can be written quite simply with shell or Perl.

Shell-script based clients
~~~~~~~~~~~~~~~~~~~~~~~~~~
Shell-script based debconf clients should source the confmodule support
library, /usr/share/debconf/confmodule by default.

Use of the shell confmodule library is described in the debconf
documentation.

Perl based clients
~~~~~~~~~~~~~~~~~~
/* to be added, need to modify ConfModule.pm */

C based clients
~~~~~~~~~~~~~~~
libdebconf has some simple support functions for C based clients;
the API is pretty simple:

#include <debconfclient.h>

struct debconfclient *client = debconfclient_new();
client->command(client, "INPUT", "low", "foo/bar", NULL);
myvar = client->value;
(or myvar = client->ret(client); )
/* ... */
debconfclient_delete(client);

the command method takes a NULL-terminated list of arguments to pass
to the confmodule. The result is stored in client->value;

Filedescriptors
~~~~~~~~~~~~~~~
cdebconf opens some aditional fds for the confmodule. Actually they are:
- 4: original stdin, defined as DEBCONF_OLD_STDIN_FD
- 5: original stdout, defined as DEBCONF_OLD_STDOUT_FD

Packages which want to call a console application may use them.

$Id: confmodule.txt 26101 2005-03-06 22:07:18Z joeyh $