INN ports deinstall config files

Kris Kennaway kris at obsecurity.org
Mon Mar 31 20:29:37 PST 2003


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.
> 
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20030331/796b7c25/attachment.bin


More information about the freebsd-ports mailing list