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

Re: avoid conf file overwrite message?

On Thu, Feb 21, 2008 at 06:24:37PM -0800, William Francis wrote:
> I have a package that I made which does a dpkg-divert  in the
> 'preinst' on a couple of config files and then installs replacements
> from them. However, even though the dpkg-divert has run (and I've
> verified it does move it to the name I specify), I still get a message
> that looks like this:

> (this is similar to mine but not exact, I just grabbed it from the net
> as I don't have mine handy)

> Configuration file `/etc/twiki/apache.conf'
>  ==> Modified (by you or by a script) since installation.
>  ==> Package distributor has shipped an updated version.
>    What would you like to do about it ? Your options are:
>     Y or I : install the package maintainer's version
>     N or O : keep your currently-installed version
>       D : show the differences between the versions
>       Z : background this process to examine the situation
>  The default action is to keep your current version.
> *** apache.conf (Y/I/N/O/D/Z) [default=N] ? Y
> Installing new version of config file /etc/twiki/apache.conf ...

> Is there a way (short of piping in /usr/bin/yes or something similar)
> to make that go away? Eventually I'll use something like puppet to
> manage these files but for now this happens to be the easiest way. If
> I do answer 'Y' it does indeed do what I want.

Diverting conffiles is not supported.  Suppressing the prompts is supported
with a dpkg option; one of --force-confnew, --force-confold, or
--force-confdef, depending on which default you want to use.  (It's possible
to configure dpkg options in /etc/apt/apt.conf, though I don't remember the
incantation exactly.)

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Reply to: