From owner-freebsd-questions@FreeBSD.ORG Tue Sep 21 13:25:03 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5641A16A4CE for ; Tue, 21 Sep 2004 13:25:03 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B50B43D31 for ; Tue, 21 Sep 2004 13:25:01 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from orion.daedalusnetworks.priv (host5.bedc.ondsl.gr [62.103.39.229])i8LDOuwx026903; Tue, 21 Sep 2004 16:24:56 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) i8LDOm9g043094; Tue, 21 Sep 2004 16:24:48 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost)i8LDOmhp043093; Tue, 21 Sep 2004 16:24:48 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 21 Sep 2004 16:24:48 +0300 From: Giorgos Keramidas To: Markie Message-ID: <20040921132448.GA43059@orion.daedalusnetworks.priv> References: <01bb01c49f69$48c66300$f800000a@laptop> <20040921093647.GC4451@orion.daedalusnetworks.priv> <022001c49fdd$714ac1d0$f800000a@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <022001c49fdd$714ac1d0$f800000a@laptop> cc: freebsd-questions@freebsd.org Subject: Re: reload rc.conf during boot process X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 13:25:03 -0000 On 2004-09-21 14:18, Markie wrote: > "Giorgos Keramidas" wrote: > | > After running my program in the rc.d mount script I then did a > | > > | > . /etc/rc.conf > | > > | > but rc.conf doesn't get reloaded. > | > | The /etc/rc script is a ``driver script'' that loads rc.conf before teh > | mount script has a chance to run. Even if you reload rc.conf in the > | mountd script this cannot affect the parent process that runs /etc/rc. > > Oh I think I see what you're saying, it's kind of like variable scope, > right? When I do . /etc/rc.conf in mountcritlocal that's loading the file, > but only for that script? It's not actually replacing the variables at all, > right? They're environment variables and that's how environment variables work in UNIX. Environment variables can be changed in a process and this will affect all the processes spawned off by the one with the changed environment but it won't affect processes higher up the hierarchy. The `/etc/rc' script starts `/etc/rc.d/mountd' after setting some of these variables (by running . /etc/rc.conf as usual). The mountd process inherits the environment of /etc/rc and can make changes to its environment as much as it wants. The changes don't affect the parent process (the /etc/rc invocation). > I saw load_rc_config 'XXX' in early.sh or something, just a minute ago! > Does the XXX do anything? Not much. It's just a placeholder to shuttup the checks near the beginning of `load_rc_config'. Passing an invalid `command name' to load_rc_config lets us load /etc/rc.conf and any other config file listed in "$source_rc_confs" without having to re-invent load_rc_config every time. > I don't actually have rc.conf.d either, as far as I can tell? This shouldn't be a problem. Don't worry about it. > My idea was so I could try out FreeBSD on my laptop and keep it usable on > the University network, [...] Yeah, I figured it was something of this sort :) - Giorgos