Date: Fri, 26 May 2006 23:53:29 -0700 From: Doug Barton <dougb@FreeBSD.org> To: fcash@ocis.net Cc: ports@freebsd.org Subject: Re: Good examples of not deleting custom config files/installing new config files Message-ID: <4477F769.4050803@FreeBSD.org> In-Reply-To: <37663.192.168.0.10.1148686196.squirrel@webmail.sd73.bc.ca> References: <37663.192.168.0.10.1148686196.squirrel@webmail.sd73.bc.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
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. You've already had some good answers, but I'd like to add something if I may. You left out a very important aspect of this issue, which is whether or not your stuff will run with the default config files or not. If so, something as simple as: for file in `find /usr/local/etc/port -type f`; do if [ ! -s "${file%.sample}" ]; then cp -p $file ${file%.sample} fi done Will handle the initial installation. As a user I also appreciate those ports that compare the installed version of a config file to the .sample version, and delete both if they are the same. It makes cleaning up after a deinstallation (and archiving during an upgrade) a lot easier. hth, Doug -- This .signature sanitized for your protection
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4477F769.4050803>