Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2003 20:29:35 -0800
From:      Kris Kennaway <kris@obsecurity.org>
To:        des@freebsd.org, ports@freebsd.org
Subject:   Re: INN ports deinstall config files
Message-ID:  <20030401042935.GA1236@rot13.obsecurity.org>
In-Reply-To: <20030401010940.GA19343@gattaca.yadt.co.uk>
References:  <20030401010940.GA19343@gattaca.yadt.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 01, 2003 at 02:09:40AM +0100, David Taylor wrote:
> I've noticed (unfortunately) that running ``portupgrade inn'' does bad
> things(tm) to installed config files.  They get deleted in the pkg_delete,
> then blank files are installed by inn.  Inn does create backups (I think)
> of config files when it's installed into a previously used directory, but
> even then, it'd be nice if the config files weren't replaced with defaults
> which probably won't work.
>=20
> I can't see an easy way to install all the config files as (say)
> foo.conf.dist or whatever, but that's the best alternative I can see (and
> seems to be how other ports deal with it).  They definately shouldn't be
> listed in pkg-plist, IMO, though, since portupgrade --all should
> definately not erase all config files installed on the machine :)

The usual solution is to install the sample config files as
foo.conf.sample or foo.conf.dist, copy them to foo.conf if that file
does not exist, and when deinstalling check whether those files are
still the same and only remove foo.conf if yes.

Look at the @exec and @unexec lines in some of the other ports that
install config files to see how it's implemented.

Kris

--qMm9M+Fa2AknHoGS
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+iRWvWry0BWjoQKURAuiLAKD31jmYWn8W6To9HaJGvQsNS8p6EwCfSRxd
y+knEItM0hB3mSzBRmy+d/M=
=lHDP
-----END PGP SIGNATURE-----

--qMm9M+Fa2AknHoGS--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030401042935.GA1236>