From owner-freebsd-current Fri Jun 2 3: 7:41 2000 Delivered-To: freebsd-current@freebsd.org Received: from mout0.freenet.de (mout0.freenet.de [194.97.50.131]) by hub.freebsd.org (Postfix) with ESMTP id 1607937B7B1 for ; Fri, 2 Jun 2000 03:07:36 -0700 (PDT) (envelope-from netchild@leidinger.net) Received: from [194.97.50.136] (helo=mx3.freenet.de) by mout0.freenet.de with esmtp (Exim 3.14 #3) id 12xoMX-0005j6-00; Fri, 02 Jun 2000 12:07:33 +0200 Received: from [213.6.45.158] (helo=Magelan.Leidinger.net) by mx3.freenet.de with esmtp (Exim 3.14 #3) id 12xoMW-0002wO-00; Fri, 02 Jun 2000 12:07:33 +0200 Received: from Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.9.3/8.9.3) with ESMTP id MAA49856; Fri, 2 Jun 2000 12:07:19 +0200 (CEST) (envelope-from netchild@Leidinger.net) Message-Id: <200006021007.MAA49856@Magelan.Leidinger.net> Date: Fri, 2 Jun 2000 12:07:13 +0200 (CEST) From: Alexander Leidinger Subject: Re: Problems with source_rc_confs To: sheldonh@uunet.co.za Cc: current@freebsd.org In-Reply-To: <28599.959939253@axl.ops.uunet.co.za> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2 Jun, Sheldon Hearn wrote: >> after the update of my rc scripts (~a month ago if I remember correctly) >> to use source_rc_conf it didn't boots as expected. E.g. it didn't starts >> anything from rc.i386. I had to source rc.conf* manually in rc.i386. > > Could you run mergemaster again to make sure you didn't botch it last > time? I did this a couple of times. I even did a "mergemaster -s". > Currently, /etc/rc pulls in rc.conf variables with source_rc_confs just > after checking for a diskless environment, i.e. before doing anything > else. The variables sourced should exist in the environment of the > sourced shell scripts as well. At the moment my /etc/rc contains: ---snip--- # If there is a global system configuration file, suck it in. # if [ -r /etc/defaults/rc.conf ]; then . /etc/defaults/rc.conf . /etc/rc.conf . /etc/rc.conf.local #source_rc_confs elif [ -r /etc/rc.conf ]; then . /etc/rc.conf fi ---snip--- and rc.i386: ---snip-- #!/bin/sh - # # $FreeBSD: src/etc/etc.i386/rc.i386,v 1.51 2000/01/24 15:21:43 asmodai Exp $ # Do i386 specific processing # . /etc/defaults/rc.conf . /etc/rc.conf . /etc/rc.conf.local ---snip--- and defaults/rc.conf: ---snip--- ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## ### scripts to source rc_conf_files overrides safely. ## ############################################################## if [ -z "${source_rc_confs_defined}" ]; then source_rc_confs_defined=yes source_rc_confs ( ) { local i sourced_files for i in ${rc_conf_files}; do case ${sourced_files} in *:$i:*) ;; *) sourced_files="${sourced_files}:$i:" if [ -r $i ]; then . $i fi ;; esac done } fi ---snip--- Bye, Alexander. -- Weird enough for government work. http://www.Leidinger.net Alexander+Home @ Leidinger.net GPG fingerprint = 7423 F3E6 3A7E B334 A9CC B10A 1F5F 130A A638 6E7E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message