Date: Sun, 28 May 2006 21:25:27 -0700 (PDT) From: "Freddie Cash" <fcash@ocis.net> To: ports@freebsd.org Subject: Re: Good examples of not deleting custom config files/installing new config files Message-ID: <61156.24.71.118.34.1148876727.squirrel@webmail.sd73.bc.ca> In-Reply-To: <4477F769.4050803@FreeBSD.org> References: <37663.192.168.0.10.1148686196.squirrel@webmail.sd73.bc.ca> <4477F769.4050803@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 26, 2006 11:53 pm, Doug Barton wrote: > 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: Yes, the port will work with all the default config files, right off the bat. I just haven't installed any of them without the .dist suffix as I hadn't figured out a nice way to do upgrades without overwriting all the customisations done by the user. > for file in `find /usr/local/etc/port -type f`; do if [ ! -s > "${file%.sample}" ]; then > cp -p $file ${file%.sample} fi done I'm guessing that would go into the post-install: target of the port's Makefile. Or would it go into a pkg-install script? > 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. That was the other part I was looking at. Thanks to all for the pointers to ports to look at. Now I'll something to do this week. :) ---- Freddie Cash fcash@ocis.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61156.24.71.118.34.1148876727.squirrel>