From owner-freebsd-questions Sat Feb 19 19:21:42 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 08FE337BDFF for ; Sat, 19 Feb 2000 19:21:37 -0800 (PST) (envelope-from dan@dan.emsphone.com) Date: Sat, 19 Feb 2000 21:19:27 -0600 From: Dan Nelson To: C J Michaels Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Making a port: What about config files? Message-ID: <20000219211927.A41519@dan.emsphone.com> References: <004e01bf7b0a$59909440$0200000a@weeble.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004e01bf7b0a$59909440$0200000a@weeble.dyndns.org>; from "C J Michaels" on Sat Feb 19 13:51:35 GMT 2000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Feb 19), C J Michaels said: > I have a simple port I maintain, but I'm still fairly new to these > things. I have a question about the config file. Is it proper to put > the config file in the PLIST or not? I mean, if you are just > removing the port to reinstall it or upgrade it, you probably > wouldn't want your config file removed. But, if you are removing the > port permanently you probably would. > > I would think to leave the config file out of the PLIST, but I wanted > to know if there was a "right" way to do things. What I've seen ports do is install the config file into the correct directory, but call it "program.conf.default" (and put that name in PLIST). A post-install rule also copies that file to "program.conf", but only if the file doesn't already exist. That creates a config file for first use, doesn't overwrite existing config files, and also lets people see the "default" config file next to their existing file when they upgrade. See the analog port for an example. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message