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

Re: preserving user changes while managing configuration files



Dennis van Dok <dennisvd@nikhef.nl> writes:

> I have a question regarding configuration file changes.
[..]
> The way I've addressed this is by adding a special marker containing a
> warning near the top of the configuration file ('warning: this file is
> maintained by foo-configure; remove this line when editing.'), and the
> utility tests if this line is present before overwriting the file.
>
> My question is whether this method sufficiently implements the policy,
> or if there are other ways to go about it.

I'd like to propose two other options:

One would be to come with a sensible default, if possible, and just not
touch the config file from the maintainer scripts. The sysadmin can then
either edit the file by hand, or use your configuration tool.

In case a sensible default is not possible, then ship without a config
file, and offer to generate one based on debconf answers if the file
does not exist.

This way, you don't have to deal with the issue at all, and the
configuration tool can still remain useful.

-- 
|8]


Reply to: