From owner-freebsd-ports Mon Apr 2 2:30:54 2001 Delivered-To: freebsd-ports@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id 7DB8637B71C for ; Mon, 2 Apr 2001 02:30:49 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 1781 invoked by uid 1000); 2 Apr 2001 09:29:40 -0000 Date: Mon, 2 Apr 2001 12:29:40 +0300 From: Peter Pentchev To: ports@FreeBSD.org Subject: Re: Port startup scripts configuration data - /etc/rc.conf? Message-ID: <20010402122940.F462@ringworld.oblivion.bg> Mail-Followup-To: ports@FreeBSD.org References: <20010319111737.B515@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010319111737.B515@ringworld.oblivion.bg>; from roam@orbitel.bg on Mon, Mar 19, 2001 at 11:17:37AM +0200 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Absolutely no opinions? :) I gather, then, that it would not be considered a Bad Thing (tm) to do ports configs that way? :) G'luck, Peter -- If this sentence didn't exist, somebody would have invented it. On Mon, Mar 19, 2001 at 11:17:37AM +0200, Peter Pentchev wrote: > Hi, > > Is it considered a 'right way' for ports startup scripts to depend > on the rc.conf/source_rc_confs mechanism for getting configuration data? > I know that the config data could be setup by editing the startup script > by hand, but this is prone to change as the port is updated (which does > happen quite often for some ports, e.g. databases/mysql323-server). > > If it is not considered a Very Bad Thing for a startup script to read > config data from rc.conf, how should it be done? Is something like > the following excerpt acceptable? > > . /etc/defaults/rc.conf > if type source_rc_confs | fgrep 'shell function' > /dev/null; then > source_rc_confs > else > rc_conf_files=${rc_conf_files-"/etc/rc.conf /etc/rc.conf.local"} > for i in ${rc_conf_files}; do > if [ -r "$i" ]; then > . $i > fi > done > fi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message