Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

confmodule(3) [xfree86 man page]

CONFMODULE(3)						     Library Functions Manual						     CONFMODULE(3)

NAME
confmodule - communicate with Debian configuration system FrontEnd. SYNOPSIS
#!/bin/sh -e . /usr/share/debconf/confmodule db_version 2.0 db_capb 'backup' CAPB=$RET db_input 'foo/bar' || true db_go || true DESCRIPTION
This is a library of shell functions that eases communication with Debian's configuration management system. It can communicate with a FrontEnd via the debconf protocol. The design is that each command in the protocol is represented by one function in this module. The func- tionname is the same as the command, except it is prefixed with "db_" and is lower-case. Call the function and pass in any parameters you want to follow the command. Any textual return code from the FrontEnd will be returned to you in the $RET variable, while the numeric return code from the FrontEnd will be returned as a return code (and so those return codes must be captured or ignored). NOTES
Once this library is loaded, any text you later output will go to standard error, rather than standard output. This is a good thing in gen- eral, because text sent to standard output is interpreted by the FrontEnd as commands. If you do want to send a command directly to the FrontEnd, you must output it to file descriptor 3, like this: echo GET foo/bar >&3 The library checks to make sure it is actually speaking to a FrontEnd by examining the DEBIAN_HAS_FRONTEND variable. If it is set, a Fron- tEnd is assumed to be running. If not, the library turns into one, and runs a copy of the script that loaded the library connected to it. This means that if you source this library, you should do so very near to the top of your script, because everything before the sourcing of the library may well be run again. SEE ALSO
debconf-devel(7), dpkg-preconfigure(8), dpkg-reconfigure(8), debconf_specification in the debian-policy package AUTHOR
Joey Hess <joeyh@debian.org> CONFMODULE(3)

Check Out this Related Man Page

..::Debconf::Client::ConfModule(3)				      Debconf					..::Debconf::Client::ConfModule(3)

NAME
Debconf::Client::ConfModule - client module for ConfModules SYNOPSIS
use Debconf::Client::ConfModule ':all'; version('2.0'); my $capb=capb('backup'); input("medium", "foo/bar"); my @ret=go(); if ($ret[0] == 30) { # Back button pressed. ... } ... DESCRIPTION
This is a module to ease writing ConfModules for Debian's configuration management system. It can communicate with a FrontEnd via the debconf protocol (which is documented in full in the debconf_specification in Debian policy). The design is that each command in the protocol is represented by one function in this module (with the name lower-cased). Call the function and pass in any parameters you want to follow the command. If the function is called in scalar context, it will return any textual return code. If it is called in list context, an array consisting of the numeric return code and the textual return code will be returned. This module uses Exporter to export all functions it defines. To import everything, simply import ":all". import Ensure that a FrontEnd is running. It's a little hackish. If DEBIAN_HAS_FRONTEND is set, a FrontEnd is assumed to be running. If not, one is started up automatically and stdin and out are connected to it. Note that this function is always run when the module is loaded in the usual way. stop The frontend doesn't send a return code here, so we cannot try to read it or we'll block. AUTOLOAD Creates handler functions for commands on the fly. SEE ALSO
The debconf specification (/usr/share/doc/debian-policy/debconf_specification.txt.gz). AUTHOR
Joey Hess <joeyh@debian.org> 2012-09-10 ..::Debconf::Client::ConfModule(3)
Man Page