Re: ignoring updates to a conffile?
On Sun, Dec 28, 2003 at 05:04:54PM +0100, Andreas Barth wrote:
> I want to do the following to a configuration file: Ignore all updates
> of the conffile inside the .deb (in other words: just keep what's
> installed on the system). At the moment this file is marked as
> conffile.
If the file stops being a conffile, it _must_ no longer be included in the
.deb. To do so would not provide policy-compliant behaviour.
> A rather problematic issue is on upgrades from a previous package
> where the previous one had it as a conffile. I think about the
> following: Just removing this file in the deb, and then do in
> postinst:
> if [ ! -a file -a -a file.dpkg-old ]; then
> mv file.dpkg-old file;
> fi
>
> if [ ! -a file ]; then
> cp template file;
> fi
I think you mean "-f" for most of those "-a". You should not be touching
anything ending in .dpkg-*. The copy seems reasonable, but the mv is
unnecessary and should be omitted. When the package is upgraded from a
version with the conffile to a version without the conffile, the actual
config file on the system remains, and should be left in place.
--
- mdz
Reply to: