ignoring updates to a conffile?
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
The idea is:
- Install the file somewhere else as template (e.g.
/usr/share/<package>/conf/...), and copy the template in postinst if
it is not already there.
- Remove the file in postrm in case of purge.
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
if [ ! -a file -a -a file.dpkg-old ]; then
mv file.dpkg-old file;
if [ ! -a file ]; then
cp template file;
Would that be ok? Any suggestions on making it better? (And: Does this
mean that the conffile is not available during some time between
replacing the old configuration, and postinst of the new package?)
PGP 1024/89FB5CE5 DC F1 85 6D A6 45 9C 0F 3B BE F1 D0 C5 D1 D9 0C