Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2001 12:29:40 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        ports@FreeBSD.org
Subject:   Re: Port startup scripts configuration data - /etc/rc.conf?
Message-ID:  <20010402122940.F462@ringworld.oblivion.bg>
In-Reply-To: <20010319111737.B515@ringworld.oblivion.bg>; from roam@orbitel.bg on Mon, Mar 19, 2001 at 11:17:37AM %2B0200
References:  <20010319111737.B515@ringworld.oblivion.bg>

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




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