Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Feb 2000 21:19:27 -0600
From:      Dan Nelson <dnelson@emsphone.com>
To:        C J Michaels <cjm2@earthling.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Making a port: What about config files?
Message-ID:  <20000219211927.A41519@dan.emsphone.com>
In-Reply-To: <004e01bf7b0a$59909440$0200000a@weeble.dyndns.org>; from "C J Michaels" on Sat Feb 19 13:51:35 GMT 2000
References:  <004e01bf7b0a$59909440$0200000a@weeble.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000219211927.A41519>