Re: Questions on Conffiles
On Tue, Dec 07, 2004 at 11:23:48PM +0800, ?????? wrote:
> >Just replace them with the original files. You may have a
> >/etc/deconf.conf.dpkg-dist file--this is the unmodified file from the
> >package.
>
> I am sorry I did not find such file, this means I have to backup first
> next time. But what about this time? :-(
It will only be there if you modified the file, and then later installed
a new version of the package that wants to update the conffile.
Since it's not there, you can just grab a copy from the debconf source.
'apt-get source debconf' should fetch the source for you, if you have
the proper deb-src line in /etc/apt/sources.list. You'll find it in the
top level of the extracted directory.
> >The system will never really "take control" of a conffile. If you've
> >made changes, dpkg will prompt you about it when trying to upgrade the
> >file.
>
> So the md5sum of one conffile will never be evaluated unless dpkg is ready
> to upgrade this conffile, and I will not be prompted before that. This means
> the newest version is prefered, is this correct?
I believe so.
> And there is another problem: what if the administrator deleted one
> conffile? If a newer version of this conffile from package maintainer
> is available, shall I be prompted to put this file into its directory?
> Or the system will ignore it since it was deleted before?
It will stay deleted, since removal of a conffile is considered a local
admin change. If you want to restore it, you have to do so manually.
> All of my problems is relevant to whether the administrator can switch
> the state of one conffile (between modifing handly and upgrading automatically)
> flexibly.
I believe the only way get "automatic" conffile updates is to manually
ensure the md5sum of the conffile matches the md5sum listed in
/var/lib/dpkg/info/somepackage.md5sums. I'm not well-versed in dpkg
internals though, so I'm not sure if that's correct.
Really, I wouldn't worry about what dpkg thinks about a certain
conffile. As long as the conffile is configured to do what you want,
you should be fine. If dpkg notices a conffile has been modified when
it wants to update it, it'll ask you what to do. At that time, you can
deal with it.
--
For every sprinkle I find, I shall kill you!
Reply to: