
Concept for Package Configuration
---------------------------------

1. The .deb package contains a configure script that can be run before
installation of the package itself. The script will ask the users for how
the package needs to be configured and will place the results into
/var/lib/config/packagename. Fields have the form

VARIABLE=VALUE

and the file is simply readable by a bash script through

. /var/lib/dpkg/config/packagename

The application might choose other forms of storing the configuration
information in that file and other forms of retrieval (such as cfgtool or
another means of obtaining configuration information).

2. On installation the package's postinst (or preinst) will check for the
presence of /var/lib/dpkg/config/packagename. If the file is not present then
simply assume some sane default values. If the file is present then retrieve
the user customization values from this file and configure the package
accordingly.

Guidelines:
-----------

1. The package will never refer to /var/lib/dpkg/config/packagename for
   configuration information except at installation time. The user might
   run a reconfiguration at any time without activating that new
   configuration.  The information in /var/lib/dpkg/config is only to be
   consulted during installation.

2. During package installation the postinst/preinst/postrm/prerm scripts
   should not prompt for any values but have the configure script do the
   job.

3. The configure script will only write information to
   /var/lib/dpkg/config/packagename and not change any other configuration files
   on the system.

Christoph Lameter, January 25, 1996
Updated January 27, 1996