Good examples of not deleting custom config files/installing new config files

Shaun Amott shaun at
Fri May 26 18:13:42 PDT 2006

On Fri, May 26, 2006 at 04:29:56PM -0700, Freddie Cash wrote:
> Could someone point me to some ports that do a good job of not
> deleting custom config files when you do updates?  I'd like to
> incorporate something similar into my ports.  Currently, I just
> install everything with a .sample and put a note in the pkg-message. 
> Which works great for upgrades, but not for the initial install.  And
> as my ports go into the "multiple-dozens of config files in multipls
> sub-directory" area, it's getting to be a pain for the users to copy
> files around.

www/horde does it in pkg-(install|deinstall) - handy if you have quite a
few files; but the more common way is to do a comparison in pkg-plist:
net-im/ejabberd is a fairly typical example of this method.

Essentially, you just need to use 'cmp -s' to determine whether any of
the files differ from their .sample counterparts.

Shaun Amott [ PGP: 0x6B387A9A ]
    Scientia Est Potentia.

More information about the freebsd-ports mailing list