preserving user changes while managing configuration files
Dear mentors,
I have a question regarding configuration file changes.
I've written a utility to manage a fairly complicated configuration
file. The utility is used in the postinst script, and debconf feeds it
the right parameters. The utility can also be used stand-alone by the
administrator.
Of course the administrator can edit the file by hand, and the Debian
policy clearly states that the maintainer scripts should not overwrite
such 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.
Thanks,
Dennis
--
D.H. van Dok :: Software Engineer :: www.nikhef.nl :: www.biggrid.nl
Phone +31 20 592 22 28 :: http://www.nikhef.nl/~dennisvd/
Reply to: