From owner-freebsd-ports Mon Mar 19 1:18:31 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 C17AE37B718 for ; Mon, 19 Mar 2001 01:18:27 -0800 (PST) (envelope-from roam@orbitel.bg) Received: (qmail 733 invoked by uid 1000); 19 Mar 2001 09:17:37 -0000 Date: Mon, 19 Mar 2001 11:17:37 +0200 From: Peter Pentchev To: ports@FreeBSD.org Subject: Port startup scripts configuration data - /etc/rc.conf? Message-ID: <20010319111737.B515@ringworld.oblivion.bg> Mail-Followup-To: ports@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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