Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2001 11:17:37 +0200
From:      Peter Pentchev <roam@orbitel.bg>
To:        ports@FreeBSD.org
Subject:   Port startup scripts configuration data - /etc/rc.conf?
Message-ID:  <20010319111737.B515@ringworld.oblivion.bg>

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

G'luck,
Peter

-- 
If the meanings of 'true' and 'false' were switched, then this sentence wouldn't be false.

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?20010319111737.B515>