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

Re: to conffile or not to conffile



On Tue, Oct 16, 2001 at 10:46:52PM -0600, Matt Armstrong wrote:
> I'm packaging my own program (http://www.lickey.com/flipit/) and have a
> question about configuration files.
> 
> So I'm left in a situation where:
> 
>     - Policy forbids me from editing the /etc/flipit.conf if I mark it a
>       conffile.

Correct.

>     - The program won't work if /etc/flipit.conf isn't edited.

Who needs to edit it, the sysadmin or the maintainer scripts?

>     - I really do want to make it a conffile, so the user is notified of
>       future options.

There are other ways to do this -- see below.

>     - I really do want to ask the user what serial port to use when the
>       thing is installed.

Use debconf to get this info.

Appropriate solution: The first time this package is installed, use
debconf to get the info, then write a config file to /etc.  Maybe add
a couple of comment lines:

# Please do not modify the next line
# config_version=0.3

On upgrades, check the "config_version" line, and if you are now
introducing a later version, either use debconf to get the desired
newer config settings or just append the default values to the
existing config file with appropriate comments, taking care to update
the config_version line and not to affect any of the sysadmin's
settings.

Remember that if every package told the sysadmin of all the new bells
and whistles, upgrades would be dreadful; you need only ask them for
new information really needed via debconf.

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

         Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
       Debian GNU/Linux Developer,  see http://people.debian.org/~jdg
          NEW: Visit http://www.helpthehungry.org/ to do just that
               ALSO  http://www.thehungersite.com/  is back!



Reply to: